A man who drunkenly exposed himself in a busy Lanarkshire park has had his name taken off the sex offenders register.
Appeal judges also quashed a five month prison sentence given to William Shaw for the public indecency offence.
The 22-year-old admitted dropping his trousers and pants in Central Park in Airdrie last September.
He has now been put on a year's probation and ordered to carry out 150 hours of community service.
Lord Osborne, sitting with Lord Clarke, at the Appeal Court in Edinburgh said they were persuaded that the sentence imposed on Shaw was excessive.
He was originally charged with simulating sex with a tree as part of the offence but that allegation was deleted.
Shaw was seen at the busy park on a Sunday afternoon with his trousers and pants at his ankles.
At Airdrie Sheriff Court, Sheriff Robert Dickson decided to jail him and placed him on the sex offenders register for seven years following the "offensive and disgusting piece of behaviour".
But Shaw appealed against the disposal and the judges heard that the Crown now accepted that representations made in support of putting him on the sex offenders register were "not well founded".
Lord Osborne said they would quash the registration requirement and they had also come to the view jailing him was not required.
The senior judge said that Shaw had indulged unwisely in excessive drinking before the offence occurred. He added: "No doubt he is now aware of the unwisdom of that behaviour."