Kamala Harris faced a barrage of tough attacks over her criminal justice record at Wednesday night’s Democratic presidential debate, with two rivals accusing her of ramping up drug prosecutions, failing wrongfully convicted defendants and keeping inmates in prison for cheap labor.

While some of the broadsides from former Vice President Joe Biden and Rep. Tulsi Gabbard of Hawaii were on-point, not all of their claims stand up to scrutiny.

The scrum represented the most prominent airing so far of criticism that has dogged Harris since she jumped into the presidential campaign in January, and could make liberal voters more skeptical of her record as San Francisco district attorney and California attorney general. “The people who suffered under your reign as prosecutor—you owe them an apology,” Gabbard told Harris, eliciting loud applause from the audience.

Harris stood her ground, attacking Biden for his own history supporting tough-on-crime bills in the Senate and, after the debate, laying into Gabbard for her past defense of Syrian dictator Bashar al-Assad. The California senator said she was proud of having worked to “reform a system that is badly in need of reform.”

Here’s a rundown of Biden and Gabbard’s accusations, and what they got right and wrong about Harris’ record:

Dismissed cases

Joe Biden: Harris “had a police department when she was there that, in fact, was abusing people’s rights… she, in fact, was told by her own people — her own staff — that she should do something about and disclose to defense attorneys like me that you, in fact, have been — the police officer did something that did not give you information of what would exculpate your client. She didn’t do that. She never did it. And so what happened? Along came a federal judge and said enough, enough. And he freed 1,000 of these people. If you doubt me, Google ‘1,000 prisoners freed, Kamala Harris.’”

The facts: Biden is correct in describing the broad outlines of this episode, but he doesn’t explain the full story and messes up many of the details.

The former vice president — who once served as a public defender in Delaware — is referring to a scandal Harris faced in her last year as San Francisco district attorney. A technician in the city’s police drug lab had been skimming some of the cocaine she was supposed to test, possibly contaminating results.

Several members of Harris’ staff had had concerns about the technician but continued to prosecute cases based on the lab’s work and failed to tell defense attorneys about the issue for months. (Harris has said she wasn’t told about the problem until it became public.) After blistering criticism from a state judge, who wrote in May 2010 that Harris’ prosecutors “failed to disclose information that clearly should have been disclosed,” Harris moved to dismiss about 1,000 drug cases.

Harris had also failed to set a written policy for disclosing potentially exculpatory evidence to defense attorneys — even though staffers recommended she set one in 2005, five years before the scandal broke into public view, the Wall Street Journal reported.

At the time, Harris was slow to admit fault, with her office originally accusing the judge of bias because she was married to a defense attorney. But she took responsibility in an interview with the Washington Post this year, saying, “the buck stops with me.”

Some of the details Biden got wrong include: Harris’ office moved for the cases to be dropped, not the judge. Not all 1,000 cases involved inmates who were “freed.” The lab tech was not a police officer. And the judge in the case was a state judge, not a federal judge (and a woman, not a man).

Death row appeals

Tulsi Gabbard: “She blocked evidence that would have freed an innocent man from death row until the courts forced her to do so. In the case of those who were on death row, innocent people, you actually blocked evidence from being revealed that would have freed them until you were forced to do so.”

The facts: Harris’s attorney general office did block DNA testing that some legal observers believe could have helped overturn the murder conviction of a death row inmate who has insisted he was framed.

Harris opposed efforts by lawyers for Kevin Cooper, a death row inmate from San Bernardino County, to get new DNA testing. In 2018, following a New York Times investigation into the case, Harris said she was wrong and called for further testing. Gov. Jerry Brown and his successor, Gavin Newsom, ordered additional testing to take place, which is still ongoing.

Her attorneys also defended several other convictions with serious problems. In one case, her office defended a murder conviction in which a prosecutor allowed false testimony in court. That provoked harsh criticism of her office from a federal appeals court panel, and Harris later changed her position, arguing for the conviction to be reversed.

Her office also appealed a judge’s decision striking down California’s death penalty, which was later overturned — even though Harris is personally opposed to capital punishment and has called for a moratorium on federal executions.

Inmate labor

Tulsi Gabbard: “She kept people in prison beyond their sentences to use them as cheap labor for the state of California.”

The facts: It’s false to say Harris kept prisoners incarcerated beyond their sentences. Lawyers in Harris’ attorney general office did unsuccessfully argue against the early release of prisoners, citing needed inmate firefighting labor — but Harris said they did so without her knowledge and publicly criticized the statement at the time.

In September 2014, attorneys for Harris argued in a court filing that the state should not free some prisoners as part of efforts to reduce prison crowding because it would negatively impact programs that put inmates to work fighting wildfires. That would “severely impact fire camp participation — a dangerous outcome while California is in the middle of a difficult fire season and severe drought,” the lawyers wrote. A judge ruled against Harris’ office’s request.

When the memo provoked headlines that fall, Harris spoke out against it and said she was not aware of it. “The way that argument played out in court does not reflect my priorities,” she told the website ThinkProgress. “The idea that we incarcerate people to have indentured servitude is one of the worst possible perceptions. I feel very strongly about that. It evokes images of chain gangs.”

Inmates in California are paid as little as eight cents per hour, according to the Prison Policy Initiative, with those battling wildfires getting about two dollars a day.

Cash bail

Tulsi Gabbard: “She fought to keep a cash bail system in place that impacts poor people in the worst kind of way.”

The facts: Harris did come out in favor of raising cash bail for defendants accused of gun-related charges as San Francisco district attorney. She’s since changed her tune, criticizing cash bail and pushing for national reform.

In her second year as district attorney, Harris argued at a Commonwealth Club forum that “people come to San Francisco to commit crimes because it’s cheaper to do it,” with the city setting lower bail rates than surrounding counties. She specifically called for higher bail in gun cases. The city court system hiked its bail rates for gun crimes the following month, over objections of defense attorneys.

Advocates argue that cash bail lets the rich stay out of jail as their cases move through the courts, while condemning many indigent defendants to long periods of incarceration, even if they’re later found innocent. The system also encourages poor defendants to plead guilty to crimes they didn’t commit, experts say.

Harris has come to agree, and in 2017 joined Republican Sen. Rand Paul of Kentucky to introduce a bill that would encourage states to reform their money bail systems. She’s recently referred to cash bail as “one of the great injustices in our criminal justice system.”

Marijuana prosecutions

Tulsi Gabbard: “She put over 1,500 people in jail for marijuana violations and then laughed about it when she was asked if she ever smoked marijuana.”

The facts: This is a highly misleading statistic.

Gabbard appears to be referring to the number of Californians who were sent to state prisons for marijuana-related offenses while Harris was state attorney general. The conservative Washington Free Beacon reported this year that at least 1,560 people went to prison for pot during Harris’ tenure from 2011 through 2016, citing reports from the California corrections department that are no longer available on their website. A department spokesman said 1,974 people were admitted to prison for marijuana and hashish charges during that time period.

But the attorney general’s office doesn’t directly prosecute the vast majority of drug cases in the state. That’s up to the individual district attorneys in each county, and it’s wrong to say Harris put those people in jail.

Still, Harris did directly prosecute marijuana cases as San Francisco district attorney from 2004 through 2010. The DA’s office has not yet released data about pot convictions during that time period.

Harris has a mixed record on marijuana. She supported legal medical marijuana from her very first political campaign, but opposed efforts to legalize recreational marijuana in California in 2010 and took no position on the legalization ballot measure that eventually passed in 2016. While launching her attorney general re-election campaign in 2014, Harris let out a big laugh when asked by a local TV reporter about her opponent’s support of legalizing pot for recreational use.

This year, Harris has come out in support of decriminalizing marijuana on the federal level, proposing a sweeping plan last week to bring the cannabis industry out of the legal shadows. She said in an interview in February that she’d personally smoked weed as a college student — “and I inhaled.”