DALLAS (AP) — A federal appeals court has struck down dozens of measures ordered by a judge to improve Texas’ foster care system, but the court said the state must still make improvements.

The 5th U.S. Circuit Court of Appeals issued the ruling Thursday in a years-long case focused on children in the state’s long-term care.

READ MORE: Amber Alert Issued For 12-Year-Old Girl Out Of Converse, Texas

U.S. District Judge Janis Graham Jack had ordered sweeping changes earlier this year, ruling that the state’s system was unconstitutionally broken. She said children labeled permanent wards of the state “almost uniformly leave state custody more damaged than when they entered.”

READ MORE: COVID-19 Pandemic Has Taken A Toll On Mental Health, Led To More Drug Abuse, CDC Says

The state quickly appealed Jack’s ruling.

The appeals court judges said they agreed with Jack’s frustration with the state failing to fix problems and that “remedial action is appropriate.” But the judges said her order went “well beyond” what’s necessary for constitutional compliance.

MORE NEWS: US To Deport 'Massive' Number Of Haitian Migrants From Texas Border Town

(© Copyright 2018 The Associated Press. All Rights Reserved. This material may not be published, broadcast, rewritten or redistributed.)