This spring, an investigation by an online news source found that, in less than three years, Texas judges sent more than a thousand teenagers to jail – actual adult jail, not juvie – over charges stemming from classroom truancy. Most students were locked up because they did not follow court orders regarding their truancy charges. In translation, they were locked up because they could not pay fines that often reached into the thousands of dollars.

Needless to say, the majority of students so charged were poor, and either black or Hispanic. While most spend only a day or a weekend, but at least 11 cases in 2014 spent more than a week. One student spent 11 days in solitary because the adult prison wasn’t considered safe for him. On leaving, he spent two days in medical suicide watch because of the isolation. And many return to school, their debt paid off by their prison time, only to be expelled their first day back, their educational path over.

There is no right to counsel in truancy court in Texas, even though the offense is a criminal misdemeanor. Even many truancy judges disagree with the pattern. “If you’re sending someone to jail and they’re missing school, then that’s counter-productive,” said a Harris County judge, Don Coffey. “It’s totally against the whole spirit of what I think the law should be.”

The bright side is that this is about to change. Texas Governor Greg Abbott has signed a bill that makes truancy a civil offense, rather than a criminal one, and requires schools to work harder to keep students in class before turning to law enforcement. It will also reduce the truancy fines that can be imposed. The new law saw widespread support on both sides of the State senate, and goes into effect on September 1, 2015.