                           NOT DESIGNATED FOR PUBLICATION

                                              No. 121,153

              IN THE COURT OF APPEALS OF THE STATE OF KANSAS

                                          STATE OF KANSAS,
                                              Appellee,

                                                    v.

                                  JEFFREY DOUGLAS MASTERSON,
                                           Appellant.

                                   MEMORANDUM OPINION

        Appeal from Shawnee District Court; DAVID DEBENHAM, judge. Opinion filed August 14, 2020.
Affirmed in part, sentences vacated, and remanded with directions.


        Kai Tate Mann, of Kansas Appellate Defender Office, for appellant.


        Steven J. Obermeier, assistant solicitor general, and Derek Schmidt, attorney general, for
appellee.


Before MALONE, P.J., MCANANY, S.J., and BURGESS, S.J.


        PER CURIAM: This appeal deals with the situation in which the district court
imposed lawful presumptive sentences under our sentencing guidelines but then
attempted to increase those sentences in an improper manner in order to reach a total
sentence contemplated by a plea agreement. In this appeal we address the question
whether, in responding to this sentencing error, the district court may vacate its otherwise
lawfully imposed sentences and resentence the defendant to much higher terms of
imprisonment in order to reach the total sentence contemplated by the plea agreement.
We conclude that the district court may not, and we vacate the defendant's current
sentences and remand for resentencing.



                                                    1
       We find no merit in the defendant's second issue, that his age at the time of his
crimes had to be established by a jury before the court could impose lifetime postrelease
supervision.


                                      PROCEDURAL HISTORY


       Jeffrey Douglas Masterson was charged with two severity level 5 counts of sexual
exploitation of a child, six off-grid felony counts of sexual exploitation of a child, plus a
severity level 9 count of interference with law enforcement. He entered into a plea
agreement with the State to resolve all nine charges. In accordance with the plea
agreement, he pled guilty to three severity level 5 person felonies of sexual exploitation
of a child, one of which the State agreed to reduce from an off-grid felony to a level 5
person felony. As part of the agreement the State agreed to dismiss the other six felony
charges against him. The plea agreement contained the following:


               "Both parties shall jointly recommend that the Court impose a sentence of 105
       months in prison. The parties shall recommend that the sentences for Counts 1 and 2 be
       made consecutive to one another. Both parties shall jointly recommend that the Court
       grant a motion for an upward durational departure and impose a sentence of 105 months
       in prison. There shall be no request for probation or border box findings by the
       Defendant."


This was a recommendation for an upward durational departure sentence. Pursuant to the
agreement, Masterson waived his right to have the upward departure factors proven to a
jury. Masterson and the State further agreed on three aggravating factors to support the
departure motion: (1) an agreement between the parties to impose a departure sentence;
(2) the State's dismissal of six off-grid felonies in exchange for the plea and a promise to
support a motion for an upward departure; and (3) the harm associated with the crime
being greater than typical.


                                                   2
       The State filed a motion for upward durational departure along with the plea
agreement. Masterson joined the State in recommending an upward durational departure
and 105 months' imprisonment.


       At the plea hearing, the State informed the district court that the State expected to
recommend that the first two counts run consecutively for "sixty-some months" and then
the district court would have the authority to upwardly depart from there. After advising
Masterson of his rights, the district court accepted Masterson's guilty pleas.


       At the sentencing hearing that followed, the State provided the three agreed-upon
reasons for the upward durational departure. The State recommended that the district
court impose standard sentences of 32 months' imprisonment on Count 1; 32 months'
imprisonment on Count 2, to be served consecutively; and 32-months' imprisonment
sentence on Count 3, to be served concurrently with Counts 1 and 2. The State explained:


               "If the Court were to follow this recommendation, then the sentence the Court
       would impose would be sixty-four months. If the Court were to then grant the State's
       Motion for an Upward Departure, it could increase the sentence by no more than double
       sixty-four months, and what we are asking for is under the terms of our plea agreement
       for the Court to impose a total sentence of 105 months in custody of the Secretary of
       Corrections."


Masterson's counsel confirmed the State's understanding as to how the sentences should
be structured to conform to the plea agreement without the court having to upward depart
"on each individual crime."


       The district court confirmed that Masterson waived his right to a jury
determination of the upward departure factors, found the three proposed factors were



                                                   3
substantial and compelling reasons to depart, and sentenced Masterson consistent with
the plea agreement as follows:


       Count 1—32 months' imprisonment;
       Count 2—32 months' imprisonment, consecutive to the sentence in Count 1; and
       Count 3—32 months' imprisonment, concurrent with the sentences in Counts 1
       and 2.


These sentences were the standard guidelines sentences for these crimes. The district
court then upwardly departed from the prison terms under Counts 1 and 2 of 64 months
and imposed a total prison term of 105 months.


       Masterson later moved to correct his illegal sentence, arguing that the sentencing
court did not follow the proper sentencing procedure. He contended that in correcting the
misapplication of the sentencing law the court could not alter the legal sentences for
Counts 1 and 2. He argued that the controlling term of confinement, based on the
consecutive guideline sentences in Counts 1 and 2, should be 64 months.


       At the hearing that followed, the prosecutor conceded that the parties had
erroneously recommended that the Court "impose a departure that I don't believe was
lawful because of the mechanics of it." The sentences imposed violated K.S.A. 2019
Supp. 21-6819(c)'s procedures and limits on departure sentences because the district
court upwardly departed on the entire sentence instead of each individual crime. The
prosecutor explained:


       "[B]ecause the parties asked the Court to impose a base sentence and then depart at the
       end, in terms of we asked the Court to impose a particular base sentence, and then a
       particular sentence on another count, but then double at the end and we didn't ask the




                                                   4
       Court to impose a departure on the original base count. But what we did was lead the
       Court into error."


Masterson and the State agreed with the court's observation that


       "what the Count should have done, was entered a sentence of let's say 32 months on
       Count I and then departed on Count I to up to 64 months then entered a sentence on
       Count II I think it was 32 or 64. The court could have departed on that up to 64 and they
       ran those two consecutive and could have resulted in a sentence of 128 months. Although
       the parties could have agreed to 105 so the Court could have still departed on Count II to
       an amount less than a total of 64, running those consecutive, and arriving at a sentence of
       105 months."


       At the conclusion of the hearing the district court found that because both parties
misunderstood the applicable sentencing law, the procedure they recommended at
sentencing could not legally result in the agreed-upon sentence. The district court vacated
the sentences on all three counts because they "defeated the terms of the plea agreement."


       Masterson moved the court to reconsider, arguing that the district court only had
jurisdiction to correct the illegal departure because all three sentences imposed were
lawful guideline sentences. He argued that in correcting the misapplication of the
sentencing law the court could not alter the legal sentences for Counts 1 and 2, so the
controlling sentence should be 64 months. Thus, he contended, the district court must
reinstate his 32-month sentences for each count and run Counts 1 and 2 consecutively for
a total of 64 months.


       At Masterson's resentencing hearing the district court stated the original sentences
imposed were the result of a mutual mistake. The court found some merit in the State's
equitable estoppel argument and adopted the State's reasoning. The court resentenced
Masterson as follows:


                                                    5
       Count 1—an upward departure sentence of 53 months' imprisonment (up from the
       guideline 32 months previously imposed);
       Count 2—an upward departure sentence of 52 months' imprisonment, consecutive
       to the sentence in Count 1 (up from the guideline 32 months previously imposed);
       and
       Count 3—32 months' imprisonment, concurrent with sentences in Counts 1 and 2.


       The court also ordered Masterson to serve lifetime postrelease supervision.


       Masterson appeals. He contends that the district court lacked jurisdiction to vacate
his lawful sentences. According to Masterson, his sentences on Counts 1, 2, and 3 were
legal sentences and, thus, the district court only had jurisdiction to set aside its attempted
departure from his guideline sentences. He asks us to remand with instructions to set
aside the court's resentencing and reinstate the guideline sentences which, as originally
imposed, have a controlling term of 64 months. He also contends that the district court
violated his constitutional rights by sentencing him to lifetime postrelease supervision
without a jury finding that he was age 18 or older when he committed his crimes.


                                          ANALYSIS


I. The Legality of the Court's Resentencing


       Our review standard in interpreting our sentencing statutes and in determining
whether Masterson's sentences are illegal is de novo. See State v. Jamerson, 309 Kan.
211, 214, 433 P.3d 698 (2019).




                                              6
Preservation


       The State contends that this issue has not been preserved for appeal because
Masterson's sentences conform to the applicable statutory provisions, in both character
and punishment. See K.S.A. 2019 Supp. 22-3504(c)(1). The State asserts Masterson's
complaint is about the procedure the district court used, "which is not a component of an
illegal sentence."


       But Masterson's issue is with the district court's decision to vacate the entirety of
his original sentences and to resentence him a second time. He claims that the court
lacked jurisdiction to increase his sentences on Counts 1 and 2 because the court had
already imposed legal sentences on those counts and could not change them, resulting in
illegal sentences. A sentence is illegal if it is imposed by a court without jurisdiction to
do so. K.S.A. 2019 Supp. 22-3504(c)(1). Masterson's illegal sentence argument has been
preserved for appeal.


Jurisdiction


       The State also argues that we lack jurisdiction to hear this appeal because the
sentence was the result of an agreement between the parties. The State relies on K.S.A.
2019 Supp. 21-6820(c)(2), which provides: "On appeal from a judgment of
conviction . . . the appellate court shall not review: . . . any sentence resulting from an
agreement between the state and the defendant which the sentencing court approves on
the record."


       But, the procedures for imposing a departure sentence must be followed and
cannot be ignored by the courts. State v. Jackson, 297 Kan. 110, 113, 298 P.3d 344
(2013). The parties may not agree to an illegal sentence. See State v. Lehman, 308 Kan.
1089, 1093, 427 P.3d 840 (2018). Thus, "a sentence that does not comply with required


                                               7
statutory procedures is an illegal sentence." Jackson, 297 Kan. at 114-15. Such a sentence
may be corrected at any time. K.S.A. 2019 Supp. 22-3504(a). We have jurisdiction to
consider this appeal.


Masterson's Claims


       Masterson claims the individual sentences originally imposed for his separate
crimes were legal sentences and the district court had no jurisdiction to vacate them and
resentence him for those crimes. The district court had the authority to upwardly depart to
twice his base guideline sentence of 32 months in Count 1 when it was originally
imposed. That, together with his consecutive 32-month guideline sentence for Count 2,
would have yielded a controlling term of 96 months. But the court failed to do so.
Instead, the court imposed two lawful consecutive sentences of 32 months and a third
lawful concurrent sentence of 32 months, for a controlling term of 64 months in prison.
He asserts that the upward departure the district court attempted to impose was unlawful,
so the only jurisdiction the district court had was to set aside the separate departure order
entered at his original sentencing.


The State's Claims


       Aside from its preservation and jurisdiction issues, which we have already
addressed, the State asserts the propriety of the district court's actions in resentencing
Masterson. It also claims that by filing his motion to correct illegal sentence (and
presumably by pursuing this appeal), Masterson has breached his contractual duty to act
fairly and in good faith. The State also contends that Masterson is equitably estopped
from advancing the arguments he makes today. We also note the district court's reasoning
under the contract principle of mutual mistake. Before getting to that issue and the State's
contract and equity arguments, we turn to the underlying issue of the propriety of the
district court's actions.


                                              8
The Propriety of the District Court's Actions


       We turn first to three key Kansas Supreme Court cases discussed by both parties.
Considered in chronological order, they are State v. Snow, 282 Kan. 323, 144 P.3d 729
(2006); State v. Guder, 293 Kan. 763, 267 P.3d 751 (2012); and Jamerson, 309 Kan. 211.


       State v. Snow


       In Snow, the defendant engaged in a string of burglaries of various businesses
which led to him being convicted on 15 counts of nonresidential burglary, theft, and
criminal damage to property and 4 counts of misdemeanor criminal damage to property.
At sentencing the court used one of Snow's burglary convictions as the base crime. Given
his criminal history, the court invoked the Special Rule that allows a prison sentence
without departure findings, rather than the guidelines' presumptive sentence, when the
defendant was on probation at the time of his or her crimes. The court imposed the
maximum presumptive sentence of 23 months for the base burglary conviction. The court
then imposed the aggravated presumptive sentence for each of Snow's other 14 counts,
ordered that they run consecutively, and denied probation. Snow received concurrent
sentences for his four misdemeanor convictions. The total of all of Snow's felony
sentences was 187 months.


       The district court did not depart on any of Snow's sentences. Under K.S.A. 2005
Supp. 21-4720(b)(4), Snow's total controlling sentence on these multiple convictions was
limited to twice the base sentence of 23 months, which was 46 months. The Supreme
Court vacated Snow's sentences and remanded to the district court for resentencing with
the following guidance:




                                             9
                 "Sentences that do not conform to the statutory provisions are illegal and must be
         remanded to the district court to correct the illegal sentence. State v. Shaw, 259 Kan. 3,
         12, 910 P.2d 809 (1996). When a defendant is convicted on several counts, a single
         judgment should be pronounced declaring the full measure of punishment to be imposed
         for all of the offenses. State v. Woodbury, 133 Kan. 1, 2, 298 Pac. 794 (1931) (concluding
         that resentencing for all 10 counts was proper even though only 7 of the counts had been
         sentenced incorrectly). When the defendant's sentence violates the maximum consecutive
         sentence allowed by K.S.A. 2005 Supp. 21-4720, the district court can resentence the
         defendant for all counts and change the base sentence to reflect aggravated durational
         departure factors previously found to increase the total consecutive sentence pursuant to
         K.S.A. 2005 Supp. 21-4720." Snow, 282 Kan. at 342.


Snow relied on Woodbury as controlling authority. We will discuss the fate of
Woodbury in connection with our next case, Guder.


         State v. Guder


         In Guder, the defendant pled guilty in 2001 to (1) illegally manufacturing a
controlled substance, (2) cultivating marijuana, (3) possessing drug paraphernalia, and (4)
four counts of criminal possession of a weapon. He was sentenced to prison in 2001 to
serve:


         (1) 162 months for illegal manufacturing;
         (2) 15 months for cultivating marijuana, consecutive to (1);
         (3) 8 months each on the 4 weapons convictions, concurrent with (2); and
         (4) 11 months for possessing paraphernalia conviction, concurrent with (3).


         Controlling term: 177 months in prison.


Guder appealed his sentence in 2001 but did not perfect the appeal.



                                                      10
       In 2004 our Supreme Court handed down State v. McAdam, 277 Kan. 136, 83 P.3d 161
(2004). Four years later, the Court of Appeals granted Guder's request to docket his appeal out
of time. On the merits, the Court of Appeals found that Guder was entitled to be resentenced on
his illegal manufacturing conviction because of the holding in McAdam. At Guder's resentencing
the court imposed the following:


       (1) An aggravated 32 months guideline sentence for illegal manufacturing (the
           McAdam issue);
       (2) 15 months for cultivating marijuana, consecutive to (1);
       (3) 11 months for possessing paraphernalia conviction, consecutive to (1); and
       (4) 8 months each on the four weapons convictions, concurrent with (3).


       Controlling term: 58 months in prison.


       Guder appealed, contending that the district court had no authority to change his
lawful paraphernalia sentence from concurrent to consecutive. The Supreme Court noted
its early holding in Woodbury, in which the court found that "a sentence pronounced
following conviction is a singular entity that cannot be subdivided into correct and
erroneous counts, and the sentencing court therefore had the latitude on remand to modify
its original sentence on all counts, including those for which no error had been found."
Guder, 293 Kan. at 765. But the Guder court stated:


               "Statutory changes to the jurisdiction of district courts to modify sentences have
       superseded the Woodbury rationale. In Anthony, 274 Kan. at 1001, this court framed the
       relevant question this way: 'Does statutory authority exist for the modification of legal
       sentences after imposition?' We concluded that a district court has no authority to modify
       a sentence unless plain statutory language provides such authority. [Citation omitted.]
               ....




                                                   11
               "When it enacted the KSGA, our legislature explicitly addressed remands
       following reversal. [Citing K.S.A. 21-4720(b)(5).]
               "Nothing in the statutory scheme, however, allows resentencing on other
       convictions following the vacating of a sentence on appeal. . . . We will not add words to
       the statute that would provide jurisdiction to resentence on other counts." Guder, 293
       Kan. at 766.


       The Guder court vacated the modification of Guder's paraphernalia conviction
from concurrent to consecutive and remanded for another resentencing. "In doing so, we
disapprove of the holding in Snow to the extent that it is contrary to this opinion." 293
Kan. at 767.


       This holding was reaffirmed by the Supreme Court six years later in State v.
Warren, 307 Kan. 609, 613, 412 P.3d 993 (2018). As it stated in Syl. ¶ 1, "When
multiconviction cases are remanded for resentencing, the Kansas Sentencing Guidelines
Act prohibits district courts from modifying sentences that have not been vacated by the
appellate court. An exception exists when the district court must alter such a sentence as a
matter of law to avoid an illegal sentence." 307 Kan. 609, Syl. ¶ 1.


       State v. Jamerson


       In Jamerson, the sentencing court followed the terms of the parties' plea
agreement and in 2001 imposed on Jamerson:


       (1) a standard guidelines sentence of 253 months for second-degree murder'
       (2) a downward departure sentence of 35 months for aggravated robbery,
           consecutive to (1); and
       (3) a downward departure sentence of 35 months for conspiracy, concurrent with
           (1) and (2).



                                                   12
       Controlling term: 288 months in prison.


       In 2015, Jamerson moved to correct an illegal sentence. He claimed an incorrect
criminal history score resulted in an illegal sentence on his second-degree murder
conviction. The district court ordered a resentencing when it was shown that the court
had used an incorrect criminal history score for Jamison and that score was used to
calculate a non-base sentence.


       The district court determined that Jamerson's aggravated robbery sentence was
legal because the criminal history error did not affect his sentence for this crime. The
downward departure sentence he received on his aggravated robbery conviction was the
same as a guidelines sentence for a defendant with no criminal history. But the
conspiracy sentence was illegal when applying the corrected criminal history score. The
correct guideline presumptive sentence range was 31-32-34 months, and Jamison had
been sentenced to 35 months.


       In 2015, the district court resentenced Jamerson on all the counts, though there
was no error in the aggravated robbery sentence. In an apparent effort to "to keep the new
sentence as close as possible to the one in 2001," 309 Kan. at 213, and as close as
possible to the plea agreement, the district court imposed:


       (1) an aggravated guidelines sentence of 186 months for the murder conviction
          (down from the 253 months previously imposed);
       (2) a standard guideline sentence of 59 months for the aggravated robbery
          conviction (not the 35-month downward departure sentence previously
          imposed) consecutive to (1); and
       (3) an aggravated guideline sentence of 34 months for the conspiracy conviction
          (down from the 35-month sentence previously imposed) consecutive to (1) and
          (2).


                                             13
       Controlling term: 279 months in prison.


       Jamerson appealed. With respect to the sentence for his aggravated robbery
conviction, he claimed the court had no authority to increase his original legal 35-month
sentence to 59 months. The Court of Appeals agreed. The State petitioned our Supreme
Court for review, and the court took up the case.


       The State argued that the Supreme Court should reexamine Guder, which leads to
an absurd result when the State and the defendant reach a plea agreement which is based
on the entirety of the sentences to be imposed. "The State complains that under Guder a
defendant can game the system and undermine a plea agreement by waiting until after
sentencing to object to incorrect criminal history scores." Jamerson, 309 Kan. at 214. The
Supreme Court rejected this argument, finding that the Guder court had thoroughly
analyzed legislative intent and the effect of the Kansas Sentencing Guidelines on the
sentencing court's common law powers.


       The State also argued that Guder and its progeny should only apply to cases
following a remand. The Jamerson court stated:


       "Procedurally, we find no reason a district court's conclusion (that a sentence is illegal) is
       different in any legally significant way from the holding by this court that a sentence is
       illegal under K.S.A. 22-3504. In either scenario the sentence must be corrected to become
       one complying with the KSGA. On concluding one or more of the sentences in a
       multiconviction case to be illegal, the district court, like an appellate court, must vacate
       the illegal sentence and correct it by resentencing in accordance with the KSGA. See
       State v. Warren, 307 Kan. 609, 412 P.3d 993 (2018) (when multiconviction cases are
       remanded for resentencing, district courts may not modify sentences that have not been
       vacated and are not illegal). But this does not mean the district court has authority to
       resentence anew for all of the convictions in a multiple conviction case. Rather, as we



                                                    14
       have held in cases directing resentencing of an illegal sentence on remand, the court may
       vacate and resentence only the illegal one in a multiconviction case. Guder, 293 Kan.
       763." Jamerson, 309 Kan. at 216.


       The Supreme Court concluded that the district court erred in increasing the legal
aggravated robbery sentence from 35 to 59 months. 309 Kan. at 218.


       Turning to the State's arguments, the State cites from Jamerson the following to
support the district court's authority to resentence Masterson by departing on prior
imposed—and on their face lawful—sentences: "[T]his court has repeatedly held that the
KSGA deprived district courts of the jurisdiction to modify sentences except to correct
arithmetic or clerical errors, to consider or reconsider departures from presumptive
sentences, or to modify sentences by reinstating previously revoked probations."
(Emphasis added.) Jamerson, 309 Kan. at 215; see Guder, 293 Kan. at 766.


       The only case cited by the State as an example of the proper reconsideration of a
departure sentence is State v. Peterson, 25 Kan. App. 2d 354, 358, 964 P.2d 695 (1998).
In the applicable earlier appeal in that case, State v. Peterson, 22 Kan. App. 2d 572, 576,
920 P.2d 463 (1996), a departure sentence was vacated and the case was remanded for
resentencing in order for the court to state on the record its substantial and compelling
reasons for departing—reasons which were absent when the departure sentence was
originally imposed. On remand, the district court imposed the same sentence but provided
the missing reasons for departing. Peterson, 25 Kan. App. 2d at 356. Obviously this is not
the situation here.


       In Guder, the court expressed the same exceptions to the rule excluding
jurisdiction to modify KSGA sentences. 293 Kan. at 766. The Guder court cited four
exemplars of that rule:




                                                  15
State v. McKnight, 292 Kan. 776, 257 P.3d 339 (2011). There, the district court
revoked the defendant's probation, ordered him to serve 22 months in prison
(reduced from the originally imposed 30 months), and mistakenly ordered no
postrelease supervision. At a later hearing, the court uncovered its mistake and
changed the sentence to include 24 months' postrelease supervision. The Supreme
Court found that McKnight's 22-month prison sentence without postrelease
supervision was a legal lesser sentence. "'A sentence is effective upon
pronouncement from the bench, regardless of the court's intent at the time the
sentence is pronounced.' [Citation omitted.] The trial court imposed a legal
sentence; therefore, the court did not have jurisdiction to later modify that
sentence by adding postrelease supervision. See McCoin, 278 Kan. at 468."
McKnight, 292 Kan. at 783. McKnight supports Masterson's argument that his
legal guideline sentences were effective upon pronouncement, and that the district
court had no jurisdiction to correct the sentencing mistake by modify the original
sentences imposed.


State v. McDaniel, 292 Kan. 443, 254 P.3d 534 (2011). The defendant was
sentenced to prison for aggravated battery. The presentence investigation report
referred to $21,269.06 in restitution. The issue of restitution came up at the
sentencing hearing. The defendant objected to the amount, and the court set the
matter over for a separate hearing, at which the court ordered restitution in the
amount of $7,744.26, an amount to which the defendant stipulated. The Supreme
Court stated: "A district judge has no jurisdiction to change a sentence once it is
pronounced." 292 Kan. at 445. But it determined the restitution order "altered
nothing about McDaniel's sentence; it merely completed it." 292 Kan. at 448.
McDaniel also supports Masterson's position. At Masterson's resentencing, the
district court did not "complete" his sentences, the court entered entirely new
sentences that differed from those originally imposed.



                                      16
       State v. Ballard, 289 Kan. 1000, 218 P.3d 432 (2009). The syllabus states: "When
       a lawful sentence has been imposed, the sentencing court has no jurisdiction to
       modify that sentence except to correct arithmetic or clerical errors. However, an
       illegal sentence can be corrected at any time." 289 Kan. 1001, Syl. ¶ 10. Ballard
       also supports Masterson's position.


       State v. Miller, 260 Kan. 892, 926 P.2d 652 (1996). The defendant moved for
       downward durational and dispositional departures. At sentencing, the district court
       denied the motion and imposed a prison sentence. Over the following weekend,
       the district judge thought further about the sentence he had imposed and decided
       he should have granted a departure. He scheduled a second hearing at which he
       granted Miller five years' probation. On the State's appeal, the Supreme Court
       stated: "Despite defendant's arguments to the contrary, nothing in these statutes
       affords a district court continuing jurisdiction after a sentencing proceeding is
       concluded. . . . We conclude the district court's modified sentence . . . and findings
       relative to departure are void for lack of jurisdiction." 260 Kan. at 900. Miller, like
       the others cited in Guder, support Masterson's position.


       Contrary to the State's position, we find that Masterson's original three sentences
were lawful sentences. At the sentencing hearing, the district court stated:


               "As a result in this case, the Court's gonna sentence you on Count 1 to thirty-two
       months in the Secretary of Corrections.
               "On Count 2, the Court will also sentence you to a term of thirty-two months in
       the Secretary of Corrections. Those sentences will run consecutive to each other.
               "The Court will sentence you on Count 3 to thirty-two months in the Secretary of
       Corrections, and that sentence will run concurrent to the sentence I imposed in Count 1
       and Count 2."




                                                  17
       Only after imposing these lawful sentences did the court take up the issue of a
departure. The court found substantial and compelling reasons to depart, "[s]o I will
depart upward to 105 months on that sentence."


       It was this departure on already imposed lawful sentences that was improper
because the district court upwardly departed on the entire sentence instead of each
individual crime, contrary to K.S.A. 2019 Supp. 21-6819(c). Rather than simply curing
the improper departure, the district court resentenced Masterson for Counts 1 and 2 and
imposed sentences which were different from the lawful sentences previously imposed.


       The principle applied in Woodbury and Snow that in a multiconviction case the
court can resentence all counts, whether lawful or not, is no longer valid. As the Supreme
Court stated in in Warren,


               "When multiconviction cases are remanded for resentencing, the Kansas
       Sentencing Guidelines Act prohibits district courts from modifying sentences that have
       not been vacated by the appellate court. An exception exists when the district court must
       alter such a sentence as a matter of law to avoid an illegal sentence." 307 Kan. 609, Syl. ¶
       1.


In Masterson's case, there was no imposition of a series of consecutive sentences that
violated the maximum aggregated duration set in K.S.A. 2019 Supp. 21-6819(b)(4). And
when Masterson was resentenced, the court did not reduce a previously imposed
departure sentence in order to comply with K.S.A. 2019 Supp. 21-6819(c)(3). Rather, at
Masterson's original sentencing the district court imposed guideline sentences on each of
Masterson's convictions but did not impose any departure consistent with K.S.A. 2019
Supp. 21-6819(c)(3). At resentencing the court did not need to depart from previously
imposed legal sentences "to avoid an illegal sentence." 307 Kan. 609, Syl. ¶ 1. The
exception described in Warren does not apply.



                                                   18
       But what about the language in Warren and other cases noted above that refers to
these resentencing limitations coming into play when a sentence has been vacated on
appeal and the case remanded for resentencing? The answer is found in Jamerson where
the court stated:


       "Procedurally, we find no reason a district court's conclusion (that a sentence is illegal) is
       different in any legally significant way from the holding by this court that a sentence is
       illegal under K.S.A. 22-3504. In either scenario the sentence must be corrected to become
       one complying with the KSGA. On concluding one or more of the sentences in a
       multiconviction case to be illegal, the district court, like an appellate court, must vacate
       the illegal sentence and correct it by resentencing in accordance with the KSGA."
       Jamerson, 309 Kan. at 216.


Thus, these resentencing rules apply not only following an appellate remand, but also
following a ruling by the district court vacating an illegal sentence.


       Here, the problem is twofold. The district court vacated legal sentences, and then
the court changed those legal sentences at the resentencing hearing. We find no case—
and the State cites none—which permits the sentencing court to set aside legal guideline
sentences and resentence a defendant in the manner employed in Masterson's case.


       McKnight serves as a good example. There, the district court revoked the
defendant's probation, sent him to prison, but mistakenly did not order postrelease
supervision. Upon uncovering the mistake, the court could not correct its error by
changing the defendant's legal sentence to include postrelease supervision. Here, the
district court mistakenly failed to depart on the individual sentences it imposed on
Masterson. Because Masterson's sentences were legal sentences, the court could not later
change them by departing from the standard guideline sentences previously imposed. The
district court did not have jurisdiction to increase Masterson's sentences from 32 months
to 53 months on Count 1, and from 32 months to 52 months on Count 2.


                                                    19
Mutual Mistake


       The district court at Masterson's resentencing relied on the principle of mutual
mistake to justify setting aside Masterson's sentences and resentencing him.


       Masterson's plea agreement was the contract entered into by the parties. As the
district court found, it is clear and complete on its face. It contains the mutual agreements
of the parties which constitute the consideration supporting it. Masterson agreed to enter
certain pleas, agreed to recommend to the court that the sentences on two counts be
consecutive, agreed to recommend to the court departure sentences for a controlling term
of up to 105 months, and agreed to stipulate to the departure factors. In exchange, the
State agreed to dismiss other charges. Both parties did what they contracted to do at the
sentencing hearing.


       Masterson's plea agreement does not address the mechanics of how the sentencing
court could properly arrive at the sentences the parties agreed to request. There is no
evidence that entering into the written plea agreement was predicated upon the district
court sentencing Masterson in the manner employed at Masterson's original sentencing.
We find no mutual mistake in the written plea agreement.


       Besides, if there had been "a mutual mistake, either of law or fact, on the terms of
the contract, the contract is not binding on the parties." Albers v. Nelson, 248 Kan. 575,
580, 809 P.2d 1194 (1991). If there was a mutual mistake of law, the remedy would have
been to void the settlement agreement, allow Masterson to set aside his pleas which were
premised on the agreement, and set the matter for trial. This the district court did not do.


       If we look to the statements of the attorneys at the sentencing hearing, Masterson
certainly was not so well versed in the law as to understand the statutory technicalities of


                                             20
sentencing. That is what his attorney was for. There was no mutual mistake between the
contracting parties—Masterson and the State. Masterson would have no idea whether the
proposed sentencing procedure was proper.


         But the State argues that Masterson is bound by the statements his attorney/agent
made. Thus, the prosecutor's statements at sentencing and the concurrence of defense
counsel, even though made without conferring with Masterson, constituted a contract.
But defense counsel's concurrence with the prosecutor's proposed sentencing procedure
does not constitute a contract. There was no bargained-for exchange. There was no
consideration. The statements made by counsel at the sentencing hearing do not
constitute a contract. The contract principle of mutual mistake does not apply to these
facts.


         We have examined cases dealing with the statutory right of a defendant to
withdraw a plea after sentencing upon a showing of manifest injustice. But we find no
case—and the parties cite none—in which the State was permitted to set aside lawful
sentences previously imposed and to let the defendant's pleas stand on the grounds that it
was the court's intention at the sentencing hearing to impose more severe sentences.


Good Faith and Fair Dealing


         The State argues that Masterson's plea agreement under principles of contract law
contains implied covenants of good faith and fair dealing. Thus, Masterson's duty to
recommend to the court a total departure sentence of 105 months as set forth in the plea
agreement did not end upon his original sentencing but continued and was in force when
the district court set aside his sentences and imposed new ones. In other words, to fulfill
this contractual duty Masterson would have had to recommend at resentencing that the
district court impose new departure sentences, which our analysis shows it no longer had
authority to do. On its face we find this contention to be beyond any reasonable


                                             21
application of the contractual covenants of good faith and fair dealing. We do not agree
that the duties of good faith and fair dealing require that Masterson urge the district court
at his resentencing to perform an act for which the court had no jurisdiction.


Equitable Estoppel


       The State argued, and the district court found persuasive, that Masterson was
equitably estopped from challenging the district court's action in vacating Masterson's
sentences and imposing a new 105-month sentence.


       The elements of equitable estoppel are set forth in Steckline Communications, Inc.
v. Journal Broadcast Group of Kansas, Inc., 305 Kan. 761, Syl. ¶ 3, 388 P.3d 84 (2017):


               "A party asserting equitable estoppel bears the burden of proving that another
       party, by acts, representations, admissions, or silence when that other party had a duty to
       speak, induced the party asserting estoppel to believe certain facts existed. The party
       asserting estoppel must also show that the party reasonably relied and acted upon such
       belief and would now be prejudiced if the other party were permitted to deny the
       existence of such facts."


       Though not concisely stated, it appears that the State's equitable estoppel is based
on the concurrence of Masterson's counsel at the original sentencing hearing with the
State's proposed sentencing protocol vis-à-vis Masterson's position when the court
vacated his sentences and imposed new ones instead.


       Equitable estoppel as defined above requires the State, as the party asserting
estoppel, to show that Masterson induced the State "to believe certain facts existed" and
that the State "reasonably relied and acted upon such belief" to its prejudice. At
Masterson's original sentencing, the State advised the court that the legal way to sentence
Masterson was to impose individual guideline sentences on each count and, after those


                                                   22
sentences were imposed, to apply the departure factors to achieve an upward controlling
sentence of 105 months. When asked, Masterson's counsel agreed. The State did not rely
on Masterson's agreement with the sentencing procedure because the sentencing
procedure was not Masterson's idea, but the State's. (The State apparently had this
sentencing procedure in mind as early as Masterson's plea hearing.) After the prosecutor
explained the State's proposed sentencing method, the court simply asked Masterson's
counsel if she agreed with the procedure described by the State. Masterson's counsel
replied, "Yes." The district court asked, "I wouldn't have to do that on each individual
crime, then?" Again, Masterson's counsel replied, "Right. Yes." The State was hardly led
down the primrose path by Masterson. The State was well along that path before
Masterson's counsel said one word. We find no evidence to support the notion that the
State had been induced by Masterson to come up with the sentencing protocol it
recommended to the court.


       Moreover, Masterson's counsel had no duty to educate the State on the proper
sentencing procedure. In Jamerson, the State argued that the decision in Guder leads to
an absurd result because "under Guder a defendant can game the system and undermine a
plea agreement by waiting until after sentencing to object to incorrect criminal history
scores." Jamerson, 309 Kan. at 214. The Supreme Court rejected the State's argument.


       The State's proposed method of imposing departure sentences was improper, and
both parties later conceded that fact to the district court. But the State contends that
Masterson was equitably estopped from opposing the district court's actions in
resentencing him. The State argues, based on State v. Hargrove, 48 Kan. App. 2d 522,
548-49, 293 P.3d 787 (2013), that judicial estoppel applies here in order to preserve the
essential integrity of the judicial process.


       But Masterson did not resist resentencing. He is the one who discovered the
sentencing error and brought it to the court's attention when he moved to correct illegal


                                               23
sentence. His opposition came when the district court sought to impose new sentences
which it had no jurisdiction to impose. The notion of preserving the essential integrity of
the judicial process is not furthered by gagging a defendant to keep him or her from
bringing to the court's attention the fact that the court has no authority to take the action
the court is about to undertake.


       We are persuaded that equitable estoppel does not apply here.


II. The Imposition of Lifetime Postrelease Supervision


       For his second issue, Masterson asserts the district court imposed an illegal
sentence when it ordered him to receive lifetime postrelease supervision under K.S.A.
2017 Supp. 22-3717(d)(1)(G)(i). He claims the district court violated the holding in
Apprendi v. New Jersey, 530 U.S. 466, 120 S. Ct. 2348, 147 L. Ed. 2d 435 (2000),
because the court engaged in judicial fact-finding when it found Masterson was over the
age of 18. Masterson argues the question of his age should have been submitted to a jury,
and he did not waive that right. The State argues that the version of K.S.A. 22-3717 in
effect when Masterson committed his crimes did not limit lifetime postrelease
supervision to only those who were age 18 or older.


Standard of Review


       We review de novo constitutional challenges under Apprendi. State v. Anthony,
273 Kan. 726, 727, 45 P.3d 852 (2002). We apply the same review standard to questions
of statutory interpretation. Nauheim v. City of Topeka, 309 Kan. 145, 149, 432 P.3d 647
(2019).


Analysis



                                              24
       Masterson raises his challenge under Apprendi. "Other than the fact of a prior
conviction, any fact that increases the penalty for a crime beyond the prescribed statutory
maximum must be submitted to a jury, and proved beyond a reasonable doubt." 530 U.S.
at 490. Masterson argues the district court violated Apprendi by ordering lifetime
postrelease supervision without submitting the question of Masterson's age to the jury.


       Masterson relies on the 2017 version of K.S.A. 22-3717, which provides that a
person sentenced to imprisonment for a sexually violent crime shall be subject to
mandatory lifetime postrelease supervision when the offender is "18 years of age or
older." K.S.A. 2017 Supp. 22-3717(d)(1)(G)(i). But, Masterson's crimes were committed
in December 2016. At the time of his crimes, K.S.A. 2016 Supp. 22-3717(d)(1)(G)
provided as follows:


               "Except as provided in subsection (u) [which does not apply], persons convicted
       of a sexually violent crime committed on or after July 1, 2006, and who are released from
       prison, shall be released to a mandatory period of postrelease supervision for the duration
       of the person's natural life."


The fundamental rule of sentencing is that a person convicted of a crime is sentenced in
accordance with the sentencing provisions in effect at the time the crime was committed.
See State v. McLinn, 307 Kan. 307, 337, 409 P.3d 1 (2018). The version of the statute in
effect when Masterson committed his crimes contains no age requirement. See K.S.A.
2016 Supp. 22-3717(d)(1)(G).


       In his reply brief, Masterson concedes that he cited the incorrect version of the
statute and that the 2016 version which contains no age limit applies. But he still argues
the State was required to prove his age to a jury before he could be sentenced to lifetime
postrelease supervision. He relies on several cases holding that lifetime postrelease




                                                   25
supervision violated the prohibition on cruel and unusual punishment of the Eighth
Amendment to the United States Constitution.


       In State v. Dull, 302 Kan. 32, 61, 351 P.3d 641 (2015), the Kansas Supreme Court
held mandatory lifetime postrelease supervision is categorically unconstitutional when
applied to a juvenile convicted of aggravated indecent liberties with a child under
Graham v. Florida, 560 U.S. 48, 130 S. Ct. 2011, 176 L. Ed. 2d 825 (2010). A panel of
this court later expanded Dull's prohibition on lifetime postrelease supervision as
categorically unconstitutional to all juveniles convicted of a sex offense. State v. Medina,
53 Kan. App. 2d 89, 97, 384 P.3d 26 (2016).


       Masterson argues that the 2017 amendments to K.S.A. 22-3717(d)(1)(G), which
require the offender be 18 or older, "simply brought [the statute] in line with what the
Constitution already required."


       There was no jury trial in Masterson's case because the case was settled. In his
plea agreement, Masterson states: "My date of birth is 04/30/1980." Thus, he was age 36
when he committed his crimes.


       The text of K.S.A. 2016 Supp. 22-3717(d)(1)(G) is clear. The text contains no age
requirement before lifetime postrelease supervision can be imposed. So a jury need not
decide Masterson's age in order for the court to determine that lifetime postrelease
supervision should be imposed. While lifetime postrelease supervision cannot be imposed
on juveniles under the holdings in Dull and Medina, there is no issue here whether
Masterson was a juvenile at the time he committed his crimes.


       To summarize, we conclude that the district court was without jurisdiction to
resentence Masterson from 32 months in prison to 53 months on Count I, and from 32
consecutive months in prison to a consecutive 52 months on Count 2. Accordingly, those


                                             26
sentences are vacated and the case is remanded for the district court to reimpose
Masterson's original guideline sentences of 32 months in prison on Count 1 and a
consecutive 32 months on Count 2, for a controlling term of 64 months. We find no merit
in Masterson's Apprendi claim and affirm the district court on that issue.


       Affirmed in part, sentences vacated, and remanded with directions.




                                            27
