No person shall be entitled to the benefit of the provisions of this chapter for the reason that the judgment by virtue of which such person is confined was erroneous as to time or place of imprisonment; but in such cases it shall be the duty of the court or officer before whom such relief is sought to sentence such person to the proper place of confinement and for the correct length of time from and after the date of the original sentence, and to cause the officer or other person having such prisoner in charge to convey him forthwith to such designated place of imprisonment.
§ 532.400, RSMo