In any case where the court imposes a maximum penalty in excess of that authorized by law, such excess shall be void and the sentence shall be valid only to the extent of the maximum term authorized by statute and shall stand commuted without further proceedings.
Wis. Stat. § 973.13
This section caps the length of a sentence reduced thereby, but it does not address other aspects or conditions of sentencing. The sentencing court may resentence the defendant if the new sentence is permitted by the law. State v. Holloway, 202 Wis. 2d 694, 551 N.W.2d 841 (Ct. App. 1996), 95-2575. This section commands that all sentences in excess of that authorized by law be declared void, including the repeater portion of a sentence. Prior postconviction motions that failed to challenge the validity of the sentence do not bar seeking relief from faulty repeater sentences. State v. Flowers, 221 Wis. 2d 20, 586 N.W.2d 175 (Ct. App. 1998), 97-3682. To allow the imposition of an unauthorized criminal penalty on the basis of waiver ignores the dictate of this section to alleviate all maximum penalties imposed in excess of that prescribed by law. State v. Hanson, 2001 WI 70, 244 Wis. 2d 405, 628 N.W.2d 759, 99-3142. Flowers holds that neither Escalona-Naranjo nor s. 974.06(4) bar motions challenging the foundation for the convictions sustaining the habitual criminal status that are properly brought under this section. However, this section as it pertains to sentencing a repeat offender applies only when the state fails to prove the prior conviction necessary to establish the habitual criminal status or when the penalty given is longer than permitted by law for a repeater. State v. Mikulance, 2006 WI App 69, 291 Wis. 2d 494, 713 N.W.2d 160, 05-1120. This section, which commutes a sentence imposed that exceeds the maximum statutory penalty, does not provide a remedy when the sentence initially imposed did not exceed the maximum statutory penalty. State v. Finley, 2016 WI 63, 370 Wis. 2d 402, 882 N.W.2d 761, 14-2488.