The district attorney’s office in Houston discharged a prosecutor for misconduct, but now the ex-prosecutor won a court ruling that reinstated her unemployment benefits after her job ended under an incoming district attorney.

The First Court of Appeals on Thursday ruled that the Texas Workforce Commission was correct to decide there was too much time between the prosecutorial misconduct and discharge of Tiffany Johnson, a former assistant district attorney in the Harris County District Attorney’s Office.