Authorities say the armed robbery seemed to be going according to plan. 26-year-old Donte Grayer had pulled out his gun and was led by the manager to the safe in the back office, according to The Atlanta Journal-Constitution.

But things went left when Grayer accidentally shot himself in the leg. He was taken to the hospital and into custody, the sheriff’s office said.

Witnesses told police a man entered the Georgia McDonald’s in a black and red wig and asked to speak with a manager. Grayer then “brandished a handgun and told the manager to take him to the back office and open the safe. The manager complied with his demands,” the sheriff’s office said.

While Grayer and the manager were in the back office witnesses heard a gunshot followed by a male screaming for help.

Grayer was reportedly found on the ground wearing only his boxers, with the wig laying nearby. Money and other articles of clothing were also found.

He is reportedly in stable condition, and is expected to be taken to the Jail when he is released from the hospital. The alleged robbery is under investigation.