The State appeals the trial court’s denial of its motion to correct Pernell Montgomery's sentence. The issue is whether the 2000 amendment to K.S.A. 21-4720(b)(5), see L. 2000, ch. 37, sec. 1; K.S.A. 2004 Supp. 21-4720(b)(5), which requires an appellate court to remand a case for resentencing when it reverses a defendant’s primary conviction, can be applied ret*512roactively to Montgomery’s case. We hold the amendment was intended to clarify rather than change existing law, and its retroactive application to Montgomery’s case does not prejudice his substantive rights.
On December 19, 1996, Montgomery was convicted by a jury of aggravated robbery, a severity level 3 person felony, and attempted rape, a severity level 4 person felony. At sentencing on January 24,1997, the trial court established the aggravated robbery conviction as the primary offense for sentencing purposes; with a criminal history score of A, Montgomery received the standard presumptive sentence of 194 months’ imprisonment. The trial court specifically noted that Montgomery’s standard presumptive sentence for attempted rape would have been 162 months’ imprisonment had his full criminal history score been applied to that offense. However, the attempted rape conviction, as the nonbase offense, was scored as a criminal history category I, and Montgomery received the standard presumptive sentence of 41 months’ imprisonment, concurrent with the aggravated robbery sentence. Montgomery also received a postrelease supervision term of 36 months.
Montgomery appealed his convictions but raised no sentencing issues. On August 6, 1999, this court reversed Montgomery’s aggravated robbery conviction and affirmed the conviction of attempted rape. State v. Montgomery, 26 Kan. App. 2d 346, 350, 988 P.2d 258 (1999).
On March 11, 2004, the State filed a motion to correct Montgomery’s sentence. Montgomery was serving his postrelease supervision term for attempted rape at the time the State filed its motion. In fact, Montgomery’s postrelease supervision had been revoked for a violation, and he was incarcerated when the motion was filed. In its motion, the State argued that when the aggravated robbery conviction was reversed on appeal, the attempted rape conviction became the primary or base offense. Thus, according to the State, Montgomery’s 41-month sentence for attempted rape, which was calculated without applying the criminal history, became illegal. The State argued Montgomery should be resentenced for *513the attempted rape conviction so that his full criminal history score could be applied to that offense.
The trial court ruled that Montgomery’s sentence for attempted rape was legal when imposed and did not become illegal when the primary conviction was reversed. The trial court noted that K.S.A. 21-4720(b)(5) was amended in 2000 to require an appellate court to remand a case for resentencing when it reverses the defendant’s primary conviction. However, the trial court ruled that the amendment only applied prospectively and did not affect Montgomery’s case. Thus, the trial court denied the motion. The State timely appeals.
The question of whether a sentence is illegal is a question of law over which an appellate court’s review is unlimited. State v. Huff, 277 Kan. 195, 199, 83 P.3d 206 (2004). Furthermore, this case involves interpretation of the Kansas Sentencing Guidelines Act (KSGA), K.S.A. 21-4701 et. seq., which is subject to unlimited review. State v. Engles, 270 Kan. 530, 532-33, 17 P.3d 355 (2001).
On appeal, the State reasserts its argument that once Montgomery’s aggravated robbery conviction was reversed, the sentence for the attempted rape conviction no longer conformed to the sentencing guidelines and was therefore illegal. The State also argues that the 2000 amendment to 21-4720(b)(5) did not change the law, but instead clarified existing law. Thus, according to the State, the amendment should be retroactively applied to Montgomery’s case. We shall focus on this argument as we deem it to be dispositive of the issue on appeal.
Some background on sentencing in multiple conviction cases might be helpful. Pursuant to the KSGA, subject to a few exceptions, all of a defendant’s prior convictions must be counted in determining the defendant’s criminal history classification for sentencing purposes. K.S.A. 21-4710. In a multiple conviction case, however, die criminal history is not applied to each count. Rather, the sentencing court must establish a “base sentence” for the “primary crime,” which is the count with the highest severity level ranking. K.S.A. 21-4720(b)(2). The defendant’s full criminal history score is applied in determining the base sentence. However, the remaining “nonbase” sentences are calculated without applying *514any criminal history score. K.S.A. 21-4720(b)(5). This is the case even when the sentencing court runs the sentences on each count concurrently. State v. Starr, 259 Kan. 713, 723, 915 P.2d 72 (1996).
The State argues that, in a multiple conviction case, if the defendant’s primary conviction is reversed on appeal, the case should be remanded for resentencing in order for the court to determine the new base sentence. This is precisely how the KSGA now operates. The current statute, K.S.A. 2004 Supp. 21-4720(b)(5), reads:
“Nonbase sentences will not have criminal history scores applied, as calculated in the criminal history I column of die grid, but base sentences will have the full criminal history score assigned. In the event a conviction designated as the primary crime in a multiple conviction case is reversed on appeal, the appellate court shall remand the multiple conviction case for resentencing. Upon resentencing, if the case remains a multiple conviction case the court shall follow all of the provisions of this section concerning the sentencing of multiple conviction cases." (Emphasis added.)
However, the statute in effect at the time of Montgomery’s convictions, K.S.A. 21-4720(b)(5), did not contain the italicized portion. This language was added by amendment in 2000. See L. 2000, ch. 37, sec. 1. The State argues that when 21-4720(b)(5) was amended, the legislature was clarifying existing law, not changing the law; thus, retroactive application of the amendment to Montgomery’s case is appropriate.
In determining whether the provisions of any statute apply prospectively or retroactively, the general rule is that a statute operates only prospectively unless there is clear language indicating the legislature intended otherwise. This rule has been modified where the statutory change is merely procedural or remedial in nature and does not prejudicially affect the substantive rights of the parties. State v. Martin, 270 Kan. 603, 608-09, 17 P.3d 344 (2001). Courts have recognized an exception to the presumption against retroactivity involving amendments designed purely to clarify the meaning of a prior enactment. See In re Care & Treatment of Hunt, 32 Kan. App. 2d 344, 358-60, 82 P.3d 861, rev. denied 278 Kan. 845 (2004).
In Hunt, the court addressed the retroactivity of amendments to the Kansas Sexually Violent Predator Act, K.S.A. 59-29a01 et *515seq., and ultimately declined to apply the “clarifying amendment exception” to that Act. 32 Kan. App. 2d at 358-62. However, in suggesting factors to determine whether the exception applies, the Hunt court noted that “ ‘courts may rely upon a declaration by the enacting body that its intent is to clarify the prior enactment.’ ” 32 Kan. App. 2d at 361 (quoting Piamba Cortes v. American Airlines, Inc., 177 F.3d 1272, 1284 [11th Cir. 1999], cert. denied 528 U.S. 1136 [2000]).
Here, the State has provided numerous references to the legislative history of the 2000 amendment to K.S.A. 21-4720(b)(5). Minutes of both the Senate Subcommittee on the Judiciary and the House Committee on the Judiciary regarding Senate Bill 488 (2000) indicate the amendment was intended to clarify existing law on sentencing in multiple conviction cases:
“SB 488 amends the sentencing guidelines law to clarify the law in a multiple conviction case when a defendant has the primary crime conviction reversed on appeal.” (Emphasis added.) Minutes, Senate Subcomm. on the Judiciary, February 21, 2000 (S.B. 488).
“Representative Shari Weber appeared before the committee as a proponent of the bill. She explained that it would clarify the law with regard to if the primary crime of conviction in a multiple conviction case was reversed.” (Emphasis added.) Minutes, House Comm, on the Judiciary, March 13, 2000 (S.B. 488).
Further, the Legislative Research Department’s Supplemental Note on S.B. 488 indicates the amendment was a clarification of the law:
“SB 488 clarifies the criminal sentencing law to provide that if the primary crime of conviction in a multiple conviction case is reversed, the appellate court is required to remand the case to district court for re-sentencing.” (Emphasis added.)
We agree with the State that the legislature’s intent in passing the 2000 amendment to K.S.A. 21-4720(b)(5) was to clarify how the statute was to operate rather tiran to change the existing law. However, the analysis concerning retroactive application of the amendment does not stop here. Even when the legislature expresses a clear intent for a statutory amendment to operate retroactively, courts must question whether such application would affect a defendant’s vested or substantive rights and, thus, violate due process. In re Hunt, 32 Kan. App. 2d at 362 (relying on Owen *516Lumber Co. v. Chartrand, 276 Kan. 218, 220-28, 73 P.3d 753 [2003]). If retroactive application of a statutory amendment prejudices a defendant’s substantive rights, it will not be permitted by the courts. In re Hunt, 32 Kan. App. 2d at 362; see also State v. Barnes, 278 Kan. 121, 129, 92 P.3d 578 (2004) (retroactive application of statutory amendment to penalty against manufacturing methamphetamine determined unconstitutional as violative of the Ex Post Facto Clause of the United States Constitution, Art. I, § 10).
Here, in denying the State’s motion to correct Montgomeiy’s sentence, the trial court stated: “In any event, because application of the amendment would nearly quadruple Montgomeiy’s sentence, the amendment must be viewed as a substantive change in the law which can only be applied prospectively.” At first blush, the trial court’s analysis seems persuasive. On closer examination, however, it is clear that the amendment merely outlines the procedure the courts should follow in determining a base sentence when a defendant’s primary conviction is reversed on appeal.
As the trial court noted at Montgomeiy’s sentencing in 1997, the standard presumptive sentence for attempted rape would have been 162 months’ imprisonment had that been his base sentence at the time. The KSGA has always provided that a defendant’s full criminal history shall be applied to the base sentence. The State is only attempting to have the attempted rape conviction established as the primary offense now that the aggravated robbery conviction has been reversed. The sentence the State now seeks to impose on Montgomery for attempted rape is not additional punishment to that prescribed by law at the time he committed the offense. For instance, had Montgomery’s aggravated robbery conviction been overturned by the trial court (e.g., on a postjudgment motion), Montgomery would have originally received 162 months’ imprisonment for attempted rape. Moreover, Montgomeiy’s original sentence, with the aggravated robbery conviction, was a controlling term of 194 months’ imprisonment. Thus, if resentencing occurs as suggested by the State, Montgomeiy’s new sentence of 162 months’ imprisonment will still be less than the original sentence. Cf. State v. Heywood, 245 Kan. 615, 620, 783 P.2d 890 (1989) *517(sentencing following remand is not presumed vindictive unless the new sentence exceeds the original sentence).
In summary, we conclude that the 2000 amendment to K.S.A. 21-4720(b)(5) was intended to clarify rather than change existing law. See K.S.A. 2004 Supp. 21-4720(b)(5). We also conclude that retroactive application of the amendment to Montgomery’s case does not prejudice his substantive rights and, thus, does not violate due process. Rather, application of the amendment to Montgomery’s case only results in Montgomery receiving the sentence for attempted rape he would have received in 1997 had it been his only crime of conviction at the time.
Finally, Montgomery argues that the State has waived or abandoned its right to seek resentencing by not raising the issue at the time this court reversed the aggravated robbery conviction. He argues the State was required to have filed a motion for rehearing with this court or a petition for review with the Kansas Supreme Court in order to preserve this issue for consideration. We disagree. Montgomery’s direct appeal raised no sentencing issues, and this court never expressly modified Montgomery’s sentence in its original decision. It appears from the record that the Kansas Department of Corrections (KDOC) took it upon itself to adjust Montgomery’s controlling sentence in this case to 41 months’ imprisonment without any order from our court. Although the State could have filed its motion sooner than it did, we conclude tire State never waived or abandoned its right to do so.
Had Montgomery completely served his sentence for attempted rape and been discharged from KDOC custody at the time the State filed its motion, we would question whether the courts retained any jurisdiction over Montgomery to correct his sentence. However, at the time the State filed its motion, Montgomery was still serving his postrelease supervision term which was an integral component of his original sentence. See K.S.A. 2004 Supp. 21-4704(e)(2); McComb v. State, 32 Kan. App. 2d 1037, 1043, 94 P.3d 715, rev. denied 278 Kan. 846 (2004). In fact, Montgomery was incarcerated on a postrelease supervision violation when the State’s motion was filed. Thus, the trial court retained jurisdiction over Montgomery’s case. Regardless of what Montgomery’s current *518KDOC status may be, the courts have continued to retain jurisdiction over the case while the appeal has been pending.
For the reasons stated herein, the trial court’s denial of the State’s motion to correct Montgomeiy’s sentence is reversed and the case is remanded with directions for the trial court to resentence Montgomery for attempted rape as the primary conviction, with credit for time served.
Reversed and remanded with directions.