A Florida man accidentally shot himself in the leg this week after leaving a firearms safety class.

According to the Palm Beach Post, police said the man was found in the bed of his pickup truck suffering from a gunshot wound to his leg.

The man told police that he has been “manipulating” the slide of his Glock 17 handgun after he’d left the safety class when the gun went off.

The man, according to the Post, was first treated at the scene and then taken to a hospital.