A potential mass shooting was avoided Tuesday night after a gunman pulled the trigger in a Fort Worth McDonald’s, only to have his gun malfunction.

24-year-old Jestin Anthony Joseph entered the restaurant just after 9 p.m. and asked a cashier for a cup. He walked to a water fountain while, according to witnesses, mumbling to himself. He then pulled a gun, demanded a customer turn over his keys and money and pulled the trigger at least five times, but the gun did not fire.

One patron attempted to wrestle the gun away before Joseph stepped outside. He managed to successfully fire the gun twice in the parking lot, once into the air and once again at a passing car.

Joseph told WFAA-TV in a jailhouse interview that he had no plans to actually hurt anyone. He said he’d been hearing voices and felt someone was out to get him, and he only planned to steal a car and flea town. He told interviewers the gun belonged to an ex-girlfriend and that he'd seek mental health treatment if a doctor diagnosed him with a problem.