The Pardo family’s nightmare is finally over. A Texas judge signed an order dismissing the state’s Department of Family and Protective Services’ (DFPS) case against the family, ending a nearly six-month ordeal.

The case attracted statewide attention following the wrongful removal of Ashley and Daniel Pardo’s 4-year-old son, Drake, by DFPS based on a tenuous allegation of medical child abuse. As the case unfolded, it became clear that investigators not only overreacted, but also very likely violated state and federal law in their conduct of the investigation.

In October, the Texas Supreme Court found DFPS failed to show that Drake was in substantial danger if allowed to remain with his parents and ordered his immediate return home. The new order tied up the remaining loose ends, formally closing the case.

Drake went home and the family is able celebrate Christmas without the specter of court or DFPS intervention hanging over them. But the ruling took away an important opportunity for the Texas Supreme Court to draw a line in the sand on DFPS overreach. It’s now up to the state legislature — and Congress — to protect other families from the hell that the Pardos were put through.

Child Protective Service agencies throughout the country are tasked with the important and difficult job of protecting children who are in imminent danger of harm from abuse or neglect. They also wield the power to inflict one of the most severe actions a state can take against its citizens — the power to separate a child from his family. The parent-child relationship is so important that the Texas Supreme Court has held that any state action interfering with it “can never be justified without the most solid and substantial reasons.”

Yet, as the Pardo case demonstrates, this right is easily violated and becomes essentially meaningless without strong safeguards in law and a judiciary that is willing to protect it by holding the department accountable for its actions. The case also provides a roadmap of reforms for the Legislature to pursue when it reconvenes.

First, lawmakers must clarify statutory procedures and strengthen the evidentiary standards DFPS and the courts rely upon when making the decision to remove children. Under current law in Texas and several other states, all it takes to remove a child is evidence sufficient to believe that a child is in danger. This is an incredibly low standard. In the Pardo case, it was met when one doctor who had never examined Drake nor fully reviewed his medical history expressed speculative concerns.

That doctor is one of a small but growing number of specialists known as child abuse pediatricians who receive state funding to assist DFPS with investigations. A recent investigative report revealed a shocking number of cases in Texas where children were wrongfully removed from their families based solely on the opinion of one of these physicians. As a result, the Texas House Human Services Committee and several members of the Legislature are working on solutions to improve the accuracy and accountability of medical consultations provided to DFPS.

A final recommendation, and perhaps the most important one, is to enact reforms to court processes that will provide real accountability for DFPS and better protect the fundamental rights of families.

Although the Texas Supreme Court correctly reversed Drake Pardo’s removal, it cannot reverse the trauma endured by Drake and his family.

We celebrate Drake’s return home and the vindication of his family. Yet, in our celebration we cannot lose sight that there are serious systemic issues in every state that must be remedied so that no other family has to endure the nightmare the Pardos lived this year.