WASHINGTON (AP) — The Justice Department watchdog says staff error resulted in 157 federal inmates being freed either before or after their correct release dates between 2009 and 2014.

An inspector general report issued Tuesday counts a total of 4,340 inmates who received “untimely” releases during those years.

The report says staff error was responsible for 157 of those cases. The remainder was for other reasons, such as sentences that were adjusted after the inmate had begun serving them.

The inspector general report calls on the Justice Department and the federal Bureau of Prisons improve training to establish a process for notifying prosecutors and court officials about untimely releases.