WASHINGTON (AP) — A federal court has ruled that the Education Department violated privacy laws with regard to students defrauded by the Corinthian for-profit college chain.

In a break with Obama administration policy, Education Secretary Betsy DeVos announced in December that some students cheated by the now-defunct schools would only get a part of their federal student loan forgiven. In order to determine how much to forgive, the agency analyzes average earnings of graduates from similar programs.

But a California district court ruled late Friday that the department’s use of Social Security Administration data in order to calculate loan forgiveness violates the Privacy Act. The court ordered that the Education Department stop the practice and stop debt collection from these students.

The court also said that it needs to hear more from the agency and plaintiffs in the class-action suit in order to decide whether or not to compel the agency to return to full loan forgiveness. A hearing is scheduled for June 4.

The decision marks an important victory for students challenging the partial loan forgiveness rule.

Toby Merill, director of the Project on Predatory Student Lending at Harvard University, which is representing the students, hailed the decision.

“The notion that students got anything other than negative value from Corinthian has been roundly disproved by student experience and the judgment of employers and the legitimate higher education sector,” Merill said in a statement. ”

An Education Department spokesperson did not respond to a request for comment Saturday.

DeVos said the approach of the Obama administration left room for potential abuse and unfairly burdened taxpayers who ended up paying for those loans with their taxes. DeVos said her new procedure will take into account the value a student received from their education and compensate them for what they didn’t get.

But critics slammed the new rule as unfair since tens of thousands of Corinthian students have already received full loan discharge under the Obama administration. They said some students will not be able to get a full refund just by virtue of working a minimum-wage job in an unrelated field and making some income.

One of the plaintiffs in the suit, Jennifer Craig, borrowed $9,000 to attend a Corinthian medical insurance and billing program in 2014, but she never received her diploma because the school shut down in 2015. She was unable to get a job in her area of study because the school did not provide her with the necessary practical training. The Education Department only forgave 20 percent of her loan. Craig says that she and her husband live in poverty and are unable to pay off the remaining 80 percent.

The Obama administration cracked down hard on for-profit colleges accused of fraud and shut down Corinthian and other major chains and tightened regulations for the schools. The administration spent $550 million to fully forgive the loans of tens of thousands of students.

There are currently nearly 100,000 claims from students still pending at the department.