
279 Kan. 989 (2005)
STATE OF KANSAS, Appellee,
v.
CHARLES D. BOLEY, Appellant.
No. 91,804.
Supreme Court of Kansas.
Opinion filed June 10, 2005.
Randall L. Hodgkinson, deputy appellate defender, argued the cause and was on the briefs for appellant.
Donna L. Longsworth, assistant county attorney, argued the cause, and David E. Yoder, county attorney, and Phill Kline, attorney general, were with her on the brief for appellee.
*990 The opinion was delivered by
LUCKERT, J.:
This case requires us to decide whether the State may, in its discretion, withdraw from a plea agreement when a case is remanded with directions to resentence the defendant to a lesser penalty based on the holding in State v. McAdam, 277 Kan. 136, 83 P.3d 161 (2004) (defendant convicted of manufacturing methamphetamine should have been sentenced to a severity level 3 drug felony rather than a severity level 1 drug felony).
As part of a plea agreement, Charles D. Boley pled no contest to one count of attempt to manufacture methamphetamine, in violation of K.S.A. 65-4159(a) and K.S.A. 21-3301, a severity level 1 drug felony. Originally, Boley had been charged with this offense, or, alternatively, with manufacture of methamphetamine and with conspiracy to manufacture methamphetamine, in violation of K.S.A. 65-4159(a) and K.S.A. 21-3302. Pursuant to the plea agreement, the State dismissed the conspiracy charge and agreed to recommend a downward durational departure sentence of 48 months' imprisonment. The district court accepted the plea after questioning Boley to ascertain the voluntariness of his plea.
Before sentencing, Boley argued to the district court that the conviction should carry a severity level 3 felony penalty under K.S.A. 65-4161(a) or, alternatively, should be a misdemeanor under K.S.A. 65-4127c rather than a severity level 1 felony. The district court found that Boley had agreed to plead guilty to a severity level 1 felony, but did impose the 48-month downward departure sentence recommended by the State.
Boley appealed. In State v. Boley, 32 Kan. App. 2d 1192, 95 P.3d 1022 (2004), the court (Boley Court of Appeals) reversed the *991 district court on the sentencing issue based upon McAdam, 277 Kan. 136 and State v. Barnes, 278 Kan. 121, 92 P.3d 578 (2004) (applying McAdam to cases pending on direct appeal). The State did not seek review of this holding.
In addition, the Boley Court of Appeals remanded the case for resentencing and ruled that because resentencing would frustrate the State's purpose in entering the plea agreement, upon remand the State could withdraw from the plea agreement and refile the charges that were dismissed pursuant to that agreement or choose to perform under the plea agreement as modified. See 32 Kan. App. 2d 1192, Syl. Boley petitioned for review of this portion of the decision, and this court granted his petition for review.

Upon Remand for Resentencing Pursuant to McAdam Should the State be Released From its Obligation to Abide by the Plea Agreement?
In his petition for review, Boley first argues we need not review the analysis of the Boley Court of Appeals becauseexcept for the fact that he objected to the severity level of his crime before the district courthis case is in exactly the same procedural posture as Barnes, which required the case to be remanded for resentencing under the rule announced in McAdam and nothing more. See 278 Kan. at 127-28. The Barnes court, however, did not rule on the status of a defendant's plea agreement on remand because that issue was not raised by the parties. Thus, Barnes does not control.
In his brief, Boley also cites several other decisions. However, much like Barnes, the issue of whether the State could withdraw from the plea agreement was not addressed in any of those opinions because it was not raised by the parties. See State v. Santos-Garza, 276 Kan. 27, 72 P.3d 560 (2003) (vacated agreed-upon upward durational departure sentences as illegal sentences and remanded for resentencing); State v. Cullen, 275 Kan. 56, 60 P.3d 933 (2003) (vacated agreed-upon upward durational departure sentences as illegal sentences and remanded for resentencing); State v. Pruitt, 275 Kan. 52, 60 P.3d 931 (2003) (vacated agreed-upon upward durational departure sentences as illegal sentences and remanded for resentencing); and State v. Haskins, 262 Kan. 728, 730-32, 942 *992 P.2d 16 (1997) (Since no plea agreement existed, the State could not violate the plea agreement by informing the trial court of defendant's true criminal history score; if there had been a plea agreement, the trial court would not have been bound by it and would have been required to sentence defendant according to his true criminal history score.)
Thus, we examine the Boley Court of Appeals' analysis and determination that the State could withdraw from the plea under the frustration of purpose doctrine. In reaching this holding, the court relied primarily on United States v. Bunner, 134 F.3d 1000 (10th Cir.), cert. denied 525 U.S. 830 (1998). In Bunner, the defendant pled guilty to using a firearm during the commission of a drug trafficking offense, see 18 U.S.C. § 924(c) (2000), as part of a plea bargain where the government agreed to dismiss the remaining charges. Three years later, the United States Supreme Court ruled that the defendant's conduct no longer constituted a violation of 18 U.S.C. § 924(c). After the defendant successfully challenged his sentence and his sentence was vacated, the government moved to reinstate the previously dismissed charges.
The Tenth Circuit Court of Appeals held that a defendant's successful post-plea challenge to his sentence did not repudiate his plea agreement; however, it did frustrate the government's purpose in entering into the plea agreement. Therefore, under the frustration of purpose doctrine, the government could choose to be discharged from its obligations under the plea agreement and reinstate the previously dismissed charges. 134 F.3d at 1005.
In following Bunner, the Boley Court of Appeals noted that this court has previously applied contract law principles to the construction of plea agreements. Indeed, we have noted that "while principles of contract law cannot be blindly incorporated into the area of plea bargaining, they provide a useful analytical framework." State v. Smith, 244 Kan. 283, 285, 767 P.2d 1302 (1989). A plea agreement is premised upon an expectation that the terms will be honored by each party and that redress is available when necessary in the courts. Santobello v. New York, 404 U.S. 257, 260-62, 30 L. Ed. 2d 427, 92 S. Ct. 495 (1971). With predictability and reliance as the foundation of the plea bargaining, so long as we remain *993 mindful of the constitutional implications of the plea bargaining process which may require a different analysis in some circumstances, see State v. Wills, 244 Kan. 62, 65-66, 765 P.2d 1114 (1998), application of fundamental contract principles is generally the best means to fair enforcement of the parties' agreed upon obligations.
Contract analysis appropriately begins with the first issue considered by the Tenth Circuit in Bunner: Did the defendant breach the plea agreement by challenging his sentence? The Bunner court rejected this argument, noting that nothing in the plea agreement suggested the defendant had relinquished his right to attack his sentence. 134 F.3d at 1004. Similarly, Boley did not agree to recommend any particular sentence, and the plea agreement did not prohibit him from seeking a lesser sentence. Additionally, Boley did not waive his right to argue the severity level of his crime or to appeal his sentence. Despite this, the State argues Boley agreed to plead to a severity level 1 crime and the severity level was a material provision of the agreement. The State's argument blurs the distinction between the conviction and the sentence. Boley's conviction stands; what changes is the length of his sentence.
In Kansas,
"all plea discussions are premised upon an understanding that such agreements are not binding upon the trial judge. Thus, when a plea agreement of guilty is tendered or received as a result of a prior plea agreement, the trial judge may give the agreement consideration, but is not bound by its terms and can reach an independent decision on whether to approve a negotiated charge or sentence concessions." State v. Hill, 247 Kan. 377, 385, 799 P.2d 997 (1990).
See K.S.A. 21-4713 (listing the actions prosecutor may take under plea agreements; prosecutor may recommend sentence); State v. Ford, 23 Kan. App. 2d 248, 253, 930 P.2d 1089 (1996), rev. denied 261 Kan. 1087 (1997) (parties to a plea agreement cannot contract for specific sentence). Therefore, there could not have been an agreement as to the sentence and, contrary to the district court's ruling, Boley did not breach the agreement by attacking his sentence.
The Tenth Circuit in Bunner and the Boley Court of Appeals in this case next considered whether the defendant's actions frustrated *994 the purposes that the parties had hoped to achieve through the plea agreement. The frustration of purpose doctrine is stated in the Restatement (Second) of Contracts § 265 (1979):
"Where, after a contract is made, a party's principal purpose is substantially frustrated without his fault by the occurrence of an event the non-occurrence of which was a basic assumption on which the contract was made, his remaining duties to render performance are discharged, unless the language or the circumstances indicate the contrary."
The Bunner court stated the considerations and elements of the frustration of purpose doctrine:
"When two parties enter into a contract, each has an object or purpose for which [that party] joins the transaction. See Arthur Linton Corbin, Corbin on Contracts § 1353 (1962). These purposes form the basis of the agreement, absent which neither party would consent to be bound. Occasionally, however, through no fault of either party, a reasonably unforeseeable event intervenes, destroying the basis of the contract and creating a situation where performance by one party will no longer give the receiving party what induced [that party] to enter into the contract in the first place. [Citation omitted.] Although the supervening event does not render performance impossible, one party's performance becomes virtually worthless to the other. See Restatement [Second of] Contracts § 265 (1979). When this occurs, the aggrieved party is discharged from performing under the doctrine of frustration of purpose. Corbin on Contracts § 1353." 134 F.3d at 1004.
The Bunner court identified the parties' purposes in entering into the plea agreement, noting that both parties entered the agreement to avoid the uncertainty of a jury verdict. The defendant also hoped to avoid the risk of being convicted on all of the original charges, and the government wanted to ensure the defendant would serve time for violating 18 U.S.C. § 924(c). See 134 F.3d at 1004-05.
The Bunner court concluded that once the defendant successfully challenged his sentence and his sentence was vacated, he was completely relieved of his obligations under the plea agreement and his performance became worthless to the government. Furthermore, because the underlying purpose of the agreement had been frustrated and the basis of the government's bargain had been destroyed, the government's obligations under the agreement became dischargeable, and the court held that the government could *995 choose to withdraw from the agreement and reinstate the original charges. 134 F.3d at 1005.
In the instant case, the Boley Court of Appeals applied the Bunner reasoning as follows:
"Here, both parties operated on the assumption that the defendant would be convicted under K.S.A. 65-4159(a), a drug severity level 1 offense, in exchange for dismissal of other offenses in the complaint. The parties then agreed that the State would recommend a downward durational departure sentence of 48 months. By successfully challenging his severity level of conviction under McAdam, the defendant would receive a new sentence of 17-19 months. While, unlike in Bunner, the State has not lost its entire bargained-for value, the significant reduction in sentence clearly frustrates the State's intended purpose in seeking a plea to a conviction under K.S.A. 65-4159(a). Consequently, the plea agreement should be deemed voidable at the discretion of the prosecutor." 32 Kan. App. 2d at 1198-99.
Unlike the Tenth Circuit, however, the Boley Court of Appeals did not examine the elements of the frustration of purpose doctrine. The elements of the doctrine are enumerated in the Restatement (Second) of Contracts § 265, comment a. The first step in applying the doctrine is to determine whether the frustrated purpose was "so completely the basis of the contract that . . . without it the transaction would make little sense." Restatement (Second) of Contracts § 265, comment a. In Bunner, the State's purpose in entering into the plea agreement was entirely frustrated when it was determined that the defendant's conduct was not a violation of 18 U.S.C. § 924(c).
In contrast, in this case, the State's purposes were achieved. Through the plea agreement, the State avoided a trial and the attendant risk of a not guilty verdict, i.e., the State obtained a conviction of a severity level 1 drug felony without having to prove the defendant guilty beyond a reasonable doubt before a jury. Additionally, the defendant served time in prison, albeit not as much time as the State expected. Because the plea agreement did not and could not bind the sentencing court, the State, in entering into the agreement, could not be assured of a specific sentence and, therefore, the length of the sentence cannot be considered to "be so completely the basis of the contract that without it the transaction would make little sense."
*996 However, according to the Boley Court of Appeals, when Boley successfully attacked his sentence, with the result that he would receive only a 17-19 month sentence, the State's purpose in entering the plea bargain was at least partially frustrated. Although true, this analysis does not comport with application of the frustration of purpose doctrine. The Restatement defines the second element of the doctrine by stating: "[T]he frustration must be substantial. It is not enough that the transaction has become less profitable for the affected party or even that [it] will sustain a loss. The frustration must be so severe that it is not fairly to be regarded as within the risks . . . assumed under the contract." Restatement (Second) of Contracts § 265, comment a.
In this regard Boley's case is distinguishable from Bunner. In Bunner, the defendant's attack on his sentence did not result in a remand for resentencing; his sentence was vacated. See 134 F.3d at 1002, 1005. In contrast, Boley's attack on his sentence will result in a resentencing, although to a sentence which is shorter than that which the State agreed to recommend. Thus, as noted by the Boley Court of Appeals: "[T]he State has not lost its entire bargained-for value." 32 Kan. App. 2d at 1199.
Furthermore, in Kansas both parties to a plea agreement assume the risk the sentencing court will impose a sentence different than the sentence recommended as part of the plea agreement because sentence recommendations made pursuant to a plea bargain are not binding on the trial court. See Hill, 247 Kan. at 385. For example, this court has determined that the sentencing court can impose a sentence on a more serious criminal history score discovered after the guilty plea but prior to sentencing. Haskins, 262 Kan. at 731-32. In this case, Boley bore the risk that the sentencing court would decide that a downward durational departure was not appropriate. If this had happened and a guidelines sentence had been imposed, it might well have been Boley crying "unfair" and seeking to have an opportunity to persuade a jury he was not guilty. On the other hand, once the sentencing court agreed it was appropriate to impose a downward departure, the court had the discretion to select the length of sentence it deemed "proportionate to the severity of the crime of conviction and the offender's criminal history" *997 under K.S.A 21-4719(b). Nothing foreclosed the trial court from sentencing Boley at that time to the sentence he will receive upon remand. Now that this is a possible sentence result, the State is the one crying "unfair." Although the probabilities of such an outcome have changed, the risk was present at the initial sentencing.
Additionally, the State bore the risk that Boley would appeal his sentence. The prosecutor could have protected against this risk by including a provision in the plea agreement requiring the defendant to waive his right to appeal or indicating that if the defendant successfully challenged his sentence, such action would be considered a breach of the agreement. In fact, the plea agreement did provide for other circumstances where the State would be released from its obligations under the agreement and allowed to reinstate charges, i.e., if the defendant failed to comply with all bond conditions, failed to appear for all court appearances, or violated federal, state or local laws pending disposition of the case.
Thus, the State does not meet the second element of the frustration of purpose doctrine because the frustration was not "so severe" that it is fairly regarded as within the risks assumed under the contract. Restatement (Second) of Contracts § 265, comment a.
The third and final element of the doctrine is that the "nonoccurrence of the frustrating event must have been a basic assumption on which the contract was made." Restatement (Second) of Contracts § 265, comment a. The written plea agreement in this case was dated July 14, 2003. By that point in time, the issue of whether someone convicted of manufacture of methamphetamine could be sentenced to a severity level 1 drug felony had been percolating in the Court of Appeals. The Court of Appeals' decision in State v. McAdam, 31 Kan. App. 2d 436, 66 P.3d 252 (2003), aff'd in part, rev'd in part 277 Kan. 136, 83 P.3d 161 (2004), was filed on April 11, 2003, and review was granted by this court on July 9, 2003. One year earlier, the Court of Appeals had ruled that because the statute prohibiting possession of drug paraphernalia, see K.S.A. 65-4152(a)(3), a severity level 4 drug felony, had identical elements to the crime of possession of ephedrine, see K.S.A. *998 65-7006(a), a severity level 1 drug felony, a defendant convicted of either crime may be sentenced only under the lesser penalty provision in State v. Frazier, 30 Kan. App. 2d 398, 42 P.3d 188, rev. denied 274 Kan. 1115 (2002). At oral argument, the prosecutor admitted considering these cases when entering into the plea agreement. The risk that Boley could only be sentenced to the lesser penalty was foreseeable and, admittedly, foreseen.
Thus, contrary to the Boley Court of Appeals' holding, we conclude that the elements of the frustration of purpose doctrine were not met under the facts of this case.
The Boley Court of Appeals also noted that some jurisdictions apply the principles of mutual mistake to require rescission of the plea agreement, rather than giving the prosecution a choice. The court rejected this result, holding that there was no mutual mistake of law and that requiring rescission would be inequitable to the State because evidence might have been destroyed and witnesses lost. 32 Kan. App. 2d at 1199-1200.
The court also recognized that "where there is a mistake of law in a plea agreement, the risk of the mistake may fall to the State, which is presumed to be in a better position to know the applicable law." 32 Kan. App. 2d at 1200 (citing United States v. Barron, 172 F.3d 1153 [9th Cir. 1999], and Coy v. Fields, 200 Ariz. 442, 27 P.3d 799 [Ariz. App. 2001]). However, the court concluded that under the circumstances, the State could not have known how this court would rule in McAdam; thus, it would have been inequitable to apply such a presumption in this case. Boley, 32 Kan. App. 2d at 1200.
As discussed above, under the circumstances of this case, when the plea agreement was signed, this court's McAdam decision was foreseeable because the Court of Appeals had issued its decision and this court had granted review. More important, as noted in State v. Barnes, 278 Kan. 121, 127, 92 P.3d 578 (2004), McAdam did not announce a new rule of law but merely applied the principles enunciated in prior cases to existing statutes. Thus, it would not be inequitable to allow the risk of the mistake of law to fall to the State in this case.
*999 Coy v. Fields, 200 Ariz. 442, and State v. Patience, 944 P.2d 381 (Utah App. 1997), are analogous to the instant case. In Coy, the Arizona Court of Appeals held the State was accountable for knowing state law when it negotiated and entered into a plea agreement pursuant to which the defendant was placed on a 15-year probationary term which exceeded the maximum allowed by law. 200 Ariz. at 444. The Coy court noted that where a plea agreement authorizes an illegally lenient sentence, courts generally either vacate the plea or give the defendant the option of withdrawing the plea or agreeing to a legal sentence in excess of the agreement's provisions. However, the plea bargain in Coy authorized an illegally excessive sentence. 200 Ariz. at 444-45.
The Coy court rejected the State's argument, based on Bunner, that the probation provision was a material part of the plea agreement and that the nullification of that provision frustrated the purpose of the plea agreement. The court noted that the plea agreement provided only for the possibility of up to lifetime probation, but the agreement also contemplated that the judge could sentence the defendant within the legal range. Had the court done so, the State could not have complained. Coy, 200 Ariz. at 445.
The Coy court relied in part on Patience in holding that the State bears the risk when a sentencing provision in a plea agreement proves to be illegal and unenforceable. Coy, 200 Ariz. at 445-46. In Patience, the defendant agreed to plead guilty to reduced charges of three counts of attempted forgery, which were third-degree felonies. The Utah Legislature had reduced attempted forgery to a misdemeanor before the parties, who were unaware of the statutory change, negotiated and entered into their plea agreement. Once the change in severity level was discovered, the defendant appealed her sentence on the ground that it was illegal. The State sought to rescind the plea agreement on the ground of mutual mistake of material fact and asked that the original charges be reinstated.
The Utah court refused the State's request to rescind the plea agreement, noting that the defendant had neither breached, withdrawn from, nor modified the agreement, conditions which generally would have permitted the State to withdraw. Patience, 944 *1000 P.2d at 386-88. Moreover, the court held that rescission was inappropriate even under a contract law analysis:
"[A] party may not rescind an agreement based on mutual mistake where that party bears the risk of mistake. See 17A Am. Jur. 2d Contracts § 215 (1991). In this case, we conclude the State bore the risk of the mistake as to the law in effect at the time the parties entered into the plea agreement. The State is generally in the better position to know the correct law . . . and the State must be deemed to know the law it is enforcing. Indeed, it is the State's law, duly enacted by its legislative branch, that is in issue. The State must be charged with knowledge of its own legislative enactments and, in that sense, cannot be said to have been mistaken about the governing statute in effect when it agreed to the plea arrangement. [Citation omitted.] . . . .
". . . Under these circumstances, we refuse to relieve the State of what it now considers a bad bargain where the plea agreement was the result of uninduced mistake as to the current provisions of Utah statute.
"We conclude that the State may not rescind the plea agreement in this case based on mutual mistake." Patience, 944 P.2d at 387-88.
In Coy and Patience, the prosecutors were mistaken about the governing statutes currently in effect. Here, the issues related to the construction of statutes. However, that difference is not critical. In Patience, the court in a footnote distinguished several cases which had vacated plea agreements because of a later interpretation of a state statute which the parties could not reasonably have anticipated. 944 P.2d at 388 n.7; see Daniels v. Smith, 478 So. 2d 110, 110 (Fla. Dist. App. 1985); People v. Clark, 43 Mich. App. 476, 482-85, 204 N.W.2d 332 (1972). As previously discussed, this court's decision in McAdam could have been reasonably anticipated because the published decision of the Boley Court of Appeals was before this court on petition for review when the plea agreement in this case was entered.
Coy and Patience are analogous and persuasive. We conclude that the State may not rescind the plea agreement in this case based upon a mistake of law.
Finally, we consider another case cited by the Boley Court of Appeals, Jolly v. State, 392 So. 2d 54 (Fla. Dist. App. 1981), even though it is not clear whether the court relied upon the case or merely discussed the case to explain why it was not following State *1001 v. Boswell, 30 Kan. App. 2d 9, 37 P.3d 40 (2001), and State v. Johnson, 30 Kan. App. 2d 1133, 55 P.3d 927 (2002).
In Boswell, the defendant pled guilty to two charges as part of a plea agreement wherein the State agreed to join in recommending a particular sentence. The trial court imposed the recommended sentence, part of which included an upward durational departure. Boswell appealed, and the Court of Appeals held the upward durational departure sentence was unconstitutional and illegal under State v. Gould, 271 Kan. 394, 23 P.3d 801 (2001), and State v. Cody, 272 Kan. 564, 35 P.3d 800 (2001). Boswell, 30 Kan. App. 2d at 11. The court next considered whether Boswell's guilty plea must also be vacated.
The court approvingly cited Jolly, a factually similar case where the defendant had entered into a plea agreement which recommended an illegally excessive sentence. As quoted by the Boswell court, Jolly held:
"`[D]ue to the fact that a post-conviction motion may be raised and ruled upon years after imposition, the state may no longer have the witnesses and other evidence necessary to pursue a trial after a defendant successfully has his judgment and sentence vacated. Therefore, in a situation involving a reduction of sentence in contravention of the plea bargain, the state should be given the option of either agreeing that both the judgment and sentence should be vacated and taking the defendant to trial on all original charges, or agreeing that only the excessive sentence should be vacated, while having the judgment stand and allowing the defendant to be resentenced . . . .' 392 So. 2d at 56." Boswell, 30 Kan. App. 2d at 14.
The Boswell court followed Jolly and held:
"[W]hen a plea agreement includes an agreement to recommend to the court an illegal sentence, the sentencing court imposes the recommended but illegal sentence, and the illegal sentence impermissibly increases the defendant's term of imprisonment, the State may either allow the defendant to withdraw his or her guilty plea or agree that the illegal portion of the sentence be vacated and the defendant be resentenced to the proper lesser term." Boswell, 30 Kan. App. 2d at 14.
In Johnson, the defendant was charged with first-degree murder but pled guilty to an amended charge of voluntary manslaughter as part of a plea agreement wherein the State agreed to recommend an upward durational departure sentence. The trial court *1002 imposed the recommended sentence. On appeal, the State acknowledged that the upward durational departure sentence was illegal, but argued that under Boswell it should have the option of requiring a retrial on the amended complaint. The Johnson court rejected this argument. 30 Kan. App. 2d at 1134. Purporting to clarify Boswell, the Johnson court stated: "What the Boswell panel intended to say is that the State may acquiesce in the defendant's request for a new trial or, in the alternative, may insist the defendant be resentenced to the proper lesser term." 30 Kan. App. 2d at 1134. Because Johnson had not requested a new trial, the only option remaining was to remand the case for resentencing and imposition of a presumptive guidelines sentence. 30 Kan. App. 2d at 1134.
In other words, the upshot of both Boswell and Johnson is that when a defendant successfully challenges an illegally excessive sentence imposed as the result of a plea bargain, it is the defendant's choice, not the State's, whether to obviate the plea agreement or not.
The Boley Court of Appeals in this case disagreed with the Johnson court's interpretation of Boswell because it directly contradicted the reasoning of Jolly. Boley, 32 Kan. App. 2d at 1195-96. According to the court, Jolly held that by attacking a sentence that was negotiated and served as the State's inducement for the plea agreement, the defendant had attacked the agreement itself, thereby releasing the State from the agreement. Thus, under Jolly, the defendant's only choice was whether to attack the sentence and release the State from the agreement or to remain under the original sentence. Boley, 32 Kan. App. 2d at 1196.
In Jolly, the defendant was sentenced to an illegally excessive sentence as the result of a "material mistake of law" by the trial judge, prosecutor, and defense counsel, all of whom mistakenly believed a mandatory minimum 3-year sentence applied. The defendant filed a motion to correct the sentence. The Jolly court agreed the trial judge erred in accepting a plea conditioned on the imposition of an improper sentence. However, the court ruled that a motion to correct the sentence was not the proper remedy under Florida law; rather, the defendant should have filed a motion to *1003 vacate the judgment and sentence, or, in other words, a motion to set aside the plea. Thus, the defendant only had the choice of remaining bound by the original plea agreement and sentence or moving to set aside the plea. If the defendant chose the latter, only then did the State have the choice of agreeing that both the conviction and sentence should be set aside or insisting that the defendant be resentenced to the proper term. 392 So. 2d at 56.
Thus, we agree with the Boley Court of Appeals' conclusion that Jolly held the defendant's only choice was whether to either withdraw the plea or abide by the original plea agreement and sentence.
Nonetheless, Jolly is distinguishable from this case in several respects. First, Jolly was not a direct appeal and the central issue was the appropriate remedy under Florida law. Furthermore, the plea negotiations in Jolly were "based on the premise that the defendant would receive a mandatory three-year sentence" so that Jolly's postconviction motion would result in a "reduction of sentence in contravention of the plea bargain." 392 So. 2d at 56. Under Florida law, if there "has been a firm agreement for a specified sentence and the judge determines to impose a greater sentence, the defendant has the [statutory] right to withdraw a plea." Goins v. State, 672 So. 2d 30, 31 (Fla. 1996). Thus, Florida law differs materially from Kansas law under which the trial court is not bound by any sentencing recommendation of the parties. Finally, the Jolly court's analysis was that there was a mistake of law. As discussed previously, there is no basis for concluding that a mistake of law allowed rescission of the plea agreement entered into in this case.
The State offers no other basis for providing it relief from the plea agreement it negotiated with Boley. We, therefore, reverse the Boley Court of Appeals, vacate the sentence of the district court, and remand this case to the district court for further proceedings consistent with this opinion.
LOCKETT, J., Retired, assigned.[1]
NOTES
[1]  REPORTER'S NOTE: Justice Tyler C. Lockett, Retired, was assigned to hear case No. 91,804 pursuant to the authority vested in the Supreme Court by K.S.A. 20-2616 to fill the vacancy on the court resulting from Justice Gernon's death.
