The Regents of the University of California did not get a fair trial in an employment discrimination case that strapped the school with $13 million in damages, a California appeals court ruled.

California’s Second District Court of Appeal on Thursday reversed a judgment in favor of Lauren Pinter-Brown, a professor of medicine who claimed the University of California, Los Angeles discriminated against her based on age and gender, over grave errors that constituted “a miscarriage of justice,” according to the opinion.