WASHINGTON — Dylann Roof, the man arrested for killing nine people in a Charleston church last month, should not have been able to buy a gun, the FBI has now determined, contradicting earlier assertions that the background check was done properly, a law enforcement official tells CNN and FBI’s director told reporters in Washington. FBI Director James Comey told reporters Friday “this rips all of our hearts out” and “we are all sick this happened.”

Comey said the FBI made a clerical error due in part between a breakdown in paperwork between police departments and counties.

Due to a prior arrest when Roof admitted to possessing drugs, he should not have been permitted to buy the gun he used in the massacre. However, the NICS agent who was performing the background check on Roof was unable to determine which county the arrest had been made in and whether Roof had been convicted of the crime. Due to the fact that Roof’s background check took longer than three days to complete, the gun shop owner was allowed to sell the gun to Roof.

Roof, the 21-year-old accused of murdering nine African-American attendees of a bible study class at Charleston’s Emanuel AME church, used .45 caliber handgun to carry out the attack, stopping several times to reload.