By David Fitzpatrick and Kyra Phillips
CNN Investigations

(CNN) — A judge has voided the original sentence of an Indiana teenager who had been sent to jail and placed on his state’s sexual offender registry after having sex with a young teen he met on a dating app. Zach Anderson had consensual sex with a girl from a nearby town who had told the boy she was 17 when in reality she was only 14.

In a ruling signed on September 3, a Michigan judge ruled that the prosecutor in the original case "did not fulfill and significantly undercut the plea agreement" and that the agreement was "breached" and accordingly Anderson’s original sentence was vacated. Anderson will be re-sentenced, and both his father and attorney said they hope Anderson will be taken off the sex offender registry.

Under the terms of the initial plea agreement, the prosecutor said that he would not "recommend nor oppose" Anderson’s request to keep the case off his permanent record. But during the sentencing, the prosecutor said Anderson’s case was just like that of two other defendants, who were denied the request to keep their records clean. "They should all probably be treated the same way," he said, "there is no difference between this gentleman (and) the two that have been before this Court, between the victims and the other victims in the community."

The judge who ruled that statement was a breach of the plea agreement, Dennis Wiley, is the same one who told Anderson in court that there was "no excuse whatsoever" for what the teenager did.

"That seems to be the culture now. Meet. Have sex, sayonara. Totally inappropriate behavior," the judge said during the original sentencing. And he took another swipe at Anderson today saying the girl appeared to be "obviously underage, developmentally and emotionally immature and easily manipulated" by Anderson.

Wiley says in his ruling that the ultimate re-sentencing will be held under a different judge.

Earlier this year, Zach Anderson said he went to an online dating site called Hot or Not and met a girl who said she was 17, who lived in a town about 20 miles away across the state line in southern Michigan. The girl admitted she was only 14 after the fact — but by law, he had committed a sex crime. He was arrested, convicted and sentenced to 90 days in jail and five years of probation. And he was placed on the sex offender registry, which his parents said was a colossal mistake.

"This is obviously a step in the right direction," Lester Anderson, his father, told CNN today.

Zach Anderson is not yet off the sex offender registry, his father said, and it may take some time before the State of Indiana reacts to any new sentencing and bond hearing.

The-CNN-Wire™ & © 2015 Cable News Network, Inc., a Time Warner Company. All rights reserved.

Join our Newsletter for the latest news right to your inbox