San Francisco police apprehended Antoinette Cowden in the city’s Tenderloin neighborhood last year with 5.55 grams of crack and $147. Since it only takes 5 grams to trigger a five-year mandatory minimum sentence in federal prison, the guilty plea to which she agreed shortly after getting caught would have carried at least that much time.

Then came disclosures of disastrous problems in San Francisco’s drug lab, where Cowden’s crack had been weighed. As a result, Assistant U.S. Attorney Matthew McCarthy recently announced in court that the weight would be recalculated to between 4 and 5 grams — thus eliminating the mandatory minimum, according to Morgan, Lewis & Bockius partner John Hemann, Cowden’s court-appointed lawyer.