SAN FRANCISCO (AP)  A California police department dogged by a sexual misconduct scandal has spent $6 million on a court-ordered computer program to track officer conduct that is not working properly, a court official said.

The court-appointed monitor of the Oakland Police Department told a federal judge earlier this month that the computer program is plagued by cost overruns, bugs and data-collection errors.

U.S. District Judge William Orrick oversees the department as part of a civil rights lawsuit development. The court appointed Robert Warshaw to monitor the department and submit frequent reports to the judge.

Warshaw reported on Jan. 12 that the computer program continues to experience bugs and poor data collection after a slow start. The program is designed to help the department eliminate unnecessary and unproductive “officer stops” and track officer conduct, including how often they use guns and engage in vehicle pursuits.

The judge has schedule a hearing Friday to discuss the monitor”s report.

City spokeswoman Karen Boyd said the program had a slow start because of staff turnover and miscommunication. But she said the City Council has allocated more money to fix the problems and administrators list the program as Oakland”s top computing priority.

“This is an extremely complicated project, and much good work has been done over the years,” Boyd said. “We have a good understanding of where we are today, including usability issues that need to be improved in the upcoming re-architecture, and have developed a solid plan for moving the project forward to a successful conclusion.”

Several officers, including a chief, lost their jobs in 2016 after an underage prostitute said she traded sex for protection with several officers.

The city paid the woman nearly $1 million to settle her legal claim last year.