A federal appeals court says a judge went too far by dismissing a Kansas drug indictment after finding that a prosecutor violated the defendant’s right to a fair trial.

The Kansas City Star reports that the 10th U.S. Circuit Court of Appeals ruled that U.S. District Court Judge Julie Robinson should retry Gregory Orozco.

Robinson dismissed Orozco’s two drug charges in December 2017 after finding that federal prosecutor Terra Morehead intimidated a witness into not testifying and belatedly disclosed evidence.

Morehead was also accused of misconduct in her handling of a case in the 1990s that caused a man to be imprisoned for nearly 23 years for a crime he didn’t commit.

The appeals court says Robinson never addressed why dismissing Orozco’s case was necessary to deter misconduct.