Abington Memorial Hospital will pay $510,000 in fines after one of its pharmacists was able to exploit a loophole and steal drugs for illegal use,  the U.S. Department of Justice announced Monday.

In July, 2013, the hospital detected a discrepancy during a drug inventory. An internal investigation found that the pharmacist, Renata Dul,  had on 85 occasions stolen more than 35,000 units of a controlled substance, including oxycodone, by exploiting a gap in the software used to track prescription medications. Dul then altered or destroyed related records. The hospital notified the Drug Enforcement Agency at that time.

The U.S. Attorney's Office found the hospital violated its responsibilities under the Controlled Substance Act, including failure to maintain adequate records and maintain proper security for receipt, purchase and administration of prescription drugs.

Since the discovery, the hospital has made many changes to its system including upgrading the pharmacy computer systems, enclosing the drug vault, adding security cameras, using locked anesthesia carts, retaining outside consultants and hiring a lead supervisor pharmacy technician who is primarily responsible for monitoring the controlled substance work flow.

In 2015, Dul pleaded guilty to 25 counts of possession with intent to distribute She was sentenced to six years in prison with three years supervised release, according to the U.S. Department of Justice.