What's the cost of alleged police misconduct in Philadelphia? For the alleged misdeeds of a few narcotics officers, it's $2 million in civil case settlements so far, with at least $8 million more expected to come.

The officers were cleared of criminal charges of roughing up drug suspects, stealing their money, and falsifying evidence in 2015, but the civil cases are mounting. Civil cases are a lot easier to win than criminal cases, which have a higher threshold of proof.

The city has been quietly settling civil cases brought by a slew of people claiming to be victims. Most of the payouts have ranged from $1,500 to $85,000, but one went as high as $625,000, and future settlements could be much higher.

Add to that the cost in human suffering. The Mayfair woman who received the $625,000 settlement spent three years in jail. She was convicted, but later cleared, of selling Xanax to an undercover informant in 2006. She testified that the drugs were used by her longtime companion to treat renal failure.

A decade later, Marcia Hintz couldn't hold back the tears when she told reporters Chris Palmer, Samantha Melamed, and Mark Fazlollah about her experiences.

The judge who convicted her believed the cop. That happens too frequently even though judges are required to consider evidence with equal care whether it comes from a police officer or a person charged with a crime.

The city and District Attorney's Office aren't automatically accepting police testimony. As a result, they have tossed out 1,000 drug cases so far,with 240 more under review.

How much court time and money was wasted on these cases is unknown. As for the accused narcotics cops, five are back on the payroll. One retired. A seventh pleaded guilty, testified against his former partners, and is testifying in the civil cases.

In the wake of these and other cases, the city is taking steps to stop bad behavior. It is buying more police body cameras and hiring a new director for the Police Advisory Commission, which has been an ineffective watchdog. The new director must step up the commission's game and be more open with the public when police misbehave.

Just as important, more needs to be done to address the tendency of some judges and juries to be biased in favor of police. This isn't just a Philadelphia problem. In high-profile cases in Baltimore, New York City, suburban Minneapolis, and elsewhere, judges and juries would not convict police accused of killing or injuring black suspects despite strong evidence.

Judges and juries need to understand that good and bad cops wear the same uniform, and that it is the judges' and juries' role during a trial to try their best to tell the difference. Otherwise, faith in the justice system, which has taken some well-deserved knocks recently, will be further undermined.

District Attorney-elect Larry Krasner campaigned on a promise to go hard on bad police behavior. That task is even more important given the misdeeds of his predecessor, Seth Williams, who is in jail for selling his office for vacations, furniture, and cash.

Unless evidence presented by police is carefully scrutinized by the DA before charging suspects, Philadelphia will continue to pay a high price for tarnished justice.