CHARLESTON, Mo. (AP) — A Missouri judge ordered the state on Monday to set free a man who was convicted of robbery in 2000 but was never sent to prison until a clerical mistake was discovered last year.

Cornealious "Mike" Anderson was 23 when he was sentenced to 13 years in prison for his role in the robbery of a fast-food restaurant's assistant manager. He told The Associated Press last month that he waited, and even asked about going to prison, but the order never came.

In the years since his conviction, Anderson started his own construction-related businesses, married and had children. He also coached youth football and volunteered at his church in Webster Groves, Missouri.

Judge Terry Lynn Brown lauded Anderson's "exemplary" behavior during his 13 years of freedom before the arrest. "You've been a good father. You've been a good husband. You've been a good taxpaying citizen of the state of Missouri.