The Michigan Court of Appeals threw out a manslaughter charge against a Detroit gas station clerk who locked the door before an angry customer shot three bystanders, killing one.

Prosecutors have argued that clerk Al-Hassan Aiyash’s actions make him criminally responsible. But the appeals court said an involuntary manslaughter charge doesn’t fit.

It was “not reasonably foreseeable” that the customer, Samuel McCray, would pull out a gun and start shooting, the court said Wednesday.