Julie Amero, the substitute teacher who could have received 40 years in jail after porn appeared on classroom PCs, was spared that fate—for now. Instead, Amero will get a new trial after revelations that the original computer analysis was flawed.

The backstory in a nutshell: Amero was substituting for an English class. She went to the restroom, and when she returned, students were gathered around a computer that was displaying porn pop-ups. Amero, who describes herself as a total computer novice, couldn't make them stop, and she eventually ran to the teacher's lounge to get help. In court, school officials admitted that the antivirus software installed on the PC was out of date and antispyware programs were not installed. A school official did tell parents, however, that the school district had comprehensive filtering and firewall software in place at the time.

Although it's hard to conjure up a simple explanation for why a substitute teacher would show middle-school students porn pop-ups on purpose, Amero was prosecuted on the ground that she had done this intentionally. She was eventually found guilty and faced the prospect of 40 years in jail because of the incident. A defense witness, who analyzed the computer but was unable to present all of his findings in court, called the case "one of the most frustrating experiences of my career, knowing full well that the person is innocent and not being allowed to provide logical proof." Her sentencing was scheduled for today, but the hearing instead turned into a motion for a new trial, according to the AP.

The computer in question was sent to a Connecticut state laboratory after the original trial finished, and the judge announced today that the lab findings may contradict those presented by the prosecution's computer expert at trial. Amero's lawyers asked for and received a new trial, and the request was not opposed by the prosecution. A date has yet to be set.

For Amero, it's been a long, strange trip, and though she'll have to wade through the details of the case once again in a new trial, today's result will certainly come as more relief than the alternative.