When Willie Nash was booked into a Mississippi corrections facility, officers failed to confiscate his phone. For that, he was sentenced to 12 years behind bars. The state’s Supreme Court acknowledges that proper booking procedure was probably not followed and that Nash did not seem to know his phone was illegal, but they nonetheless ruled Thursday that the sentence is fair.

After Nash was booked into the Newton County Jail on a misdemeanor charge, he asked a jailer to charge his phone, seemingly unaware that he was not supposed to have the item. Mississippi Code Section 47-5-193 considers the possession behind bars of “any weapon, deadly weapon, unauthorized electronic device, contraband item, or cell phone” a felony; the offense carries a prison sentence of three to 15 years.

The jailer took the phone to a sheriff’s deputy. Nash initially denied ownership, but officials confirmed that it was his using the passcode he had previously provided the jailer. In one of the text exchanges discovered, a contact inquired about Nash’s location, to which he responded, “in jail.”