A British man discovered wedged in a chimney naked was sentenced to two months in prison on charges of attempted burglary, the Telegraph reported on Tuesday.

Firefighters discovered Daniel Davies, 20, after a delivery driver heard him yelling “help me” from the chimney stack of a convenience store near Manchester in October.

Davies told police that he climbed onto the roof while trying to escape drug dealers he owed money, the Telegraph reported. Prosecutors said Davies said his clothes fell off as he tried to escape the chimney.

“Were this matter not so serious, the facts would be decidedly comic,” Judge Bruce Macmillan told Davies as he sentenced him. “You attempted to burgle a Tesco store. However, you got stuck in the chimney where you remained for several hours.”

He sentenced Davies to two months in a young offenders’ institution, the newspaper reported.

Macmillan said because Davies had served 62 days on an electronic tag, 31 days would count towards his sentence. The law stipulates that a person wearing an electronic tag for nine hours a day serves the equivalent of half a day in prison.

Davies had originally pleaded not guilty to attempted burglary, but later changed his plea to guilty, the Telegraph reported.

Click here to read the full report.