The Iowa Supreme Court has ruled a period of “house arrest” should be considered part of a sex offender’s prison sentence. 

In 2004, Michael Leroy Anderson pled guilty to two counts of enticing away a minor. Anderson wasn’t sent to prison, however. He was sent to a treatment program for sex offenders, then he was allowed to go home, but Anderson had to wear an electronic ankle bracelet so officials could track his whereabouts.

His probation was revoked after Anderson — who was 37 at the time — was caught with a naked 16-year-old in his home. Anderson was sent to prison, but he wasn’t given credit for that period of house arrest. Prosecutors argued it would be “absurd” to give Anderson credit for it since he used the time to commit another sex crime.

The state’s high court overturned the decisions of two lower courts on this case. The Supreme Court justices cited a change legislators made to the criminal code in 1996 in making their decision, but indicated they are puzzled as to why legislators made that change.