[No. 69876-7.

En Banc.]

Argued May 24, 2001.

Decided July 26, 2001.

#### *In the Matter of the Personal Restraint of*Ira Erwin Call, *Respondent.*

*317*Steven J. Tucker, Prosecuting Attorney for Spokane County,*and *Kevin M. Korsmo, Deputy,*for appellant.

*Ira E. Call,*pro se.

*Sheryl G. McCloud,*for respondent.

Smith, J.

— Petitioner State of Washington seeks review of a decision by the Court of Appeals, Division Three, which granted the personal restraint petition of Respondent Ira Erwin Call, remanding to the Spokane County Superior Court for resentencing on his conviction for robbery in the *318first degree because of the inadvertent inclusion of two prior convictions in Texas which had “washed out” with the result that the trial court used an offender score of 10 instead of 8 and sentenced him to 129 months instead of 108 months, the lower end of the standard range. We granted review. We affirm.

*QUESTION PRESENTED*

The question presented in this case is whether the invited error doctrine precludes a defendant from arguing in a personal restraint petition that his offender score is lower than the Prosecuting Attorney and the defendant jointly represented to the trial court at sentencing even though the sentence actually imposed was within the standard range, but not at the low end of the standard range, for the correct offender score.

*STATEMENT OF FACTS*

On April 22, 1999, the Spokane County Prosecuting Attorney filed a second amended information in the Spokane County Superior Court charging Respondent Ira Erwin Call with robbery in the first degree.1 The information read:

> That the defendant, IRA ERWIN CALL, in the State of Washington, on or about December 9, 1998, with the intent to commit theft, did unlaw-fully [sic] take and retain personal property, an automobile, a purse and its contents, from the person and in the presence of Lila K. Milliron, against such person’s will, by use or threatened use of immediate force, violence and fear of injury to Lila K. Milliron, and in the commission of and immediate flight therefrom, the defendant was armed with a deadly weapon, to wit: a knife [.]

That same day, the trial court, the Honorable Linda G. Tompkins, accepted Respondent’s plea of “guilty” to the one *319count of first degree robbery.2 Judge Tompkins also accepted his plea of “guilty” to two additional offenses: second degree robbery and first degree theft.3 The parties agreed that Respondent would plead guilty to all three offenses and that the Prosecuting Attorney would dismiss a deadly weapon enhancement charge and four counts of forgery in conjunction with the first degree robbery charge, and dismiss one count of possession of stolen property in the first degree.4

The Prosecuting Attorney and Respondent both agreed that Respondent’s offender score for purposes of sentencing was “9 plus, essentially a 10” on the two robbery convictions and 9 on the theft conviction.5 The calculation of his offender score of 10 included seven prior offenses,6 two of which were committed in Texas,7 and the two other additional offenses charged against him in this case.

The Prosecuting Attorney agreed to recommend a sen*320tence at the low end of the standard range8 based upon an offender score of 10, which the parties agreed was 129 to 171 months on the first degree robbery conviction.9 The Prosecuting Attorney and Respondent jointly recommended that the court sentence Respondent to 129 months on the first degree robbery conviction.10 The court sentenced him to 129 months on that charge.11 The court also ordered the sentences on the two other offenses to be served concurrently with the first degree robbery conviction.12 Respondent did not appeal.

On June 22, 1999, Respondent Call filed a personal restraint petition in the Court of Appeals, Division Three, contending the trial court based his sentence for first degree robbery on an incorrect offender score.13 He argued that his two prior Texas convictions should not have been used in calculating his offender score for the first degree robbery conviction because they “washed out” under former RCW 9.94A.360(2) (1999) of the Sentencing Reform Act (SRA) of 1981. He claimed his Texas convictions were equivalent to Class C felonies and he was free in the community for more than five years before his, next offense — a 1996 forgery *321conviction.14 The State responded that any error was invited because of the plea agreement between Respondent and the State and their joint agreement to recommend a sentence of 129 months; and even if the Texas convictions were not counted, Respondent’s offender score would be 8 and his sentence of 129 months would still be within the standard range of 108 to 144 months.

The Court of Appeals contacted the Texas Department of Criminal Justice which confirmed that Respondent was released from confinement on the two 1987 Texas convictions more than five years before his next offense.15

After informing the State of this information and inviting a response,16 the Court of Appeals granted Respondent’s personal restraint petition on March 30, 2000 and remanded the case for resentencing using an offender score of 8 instead of a score of 10 in calculating his sentence for first degree robbery.17 The Court of Appeals, in an unpublished per curiam opinion, stated that:

> The invited error doctrine cannot cure the court’s lack of statutory authority for a sentence imposed using an incorrect offender score. Further, it is impossible to say with certainty that the superior court here would have imposed the same sentence if it had used the proper offender score. As set forth *322above, Mr. Call’s statement on plea of guilty indicates the State would recommend a “low end” standard range sentence. “Low end”, counting the Texas convictions, is the 129 months that the sentencing court imposed. “Low end”, without those convictions, is 108 months. If the court would have sentenced Mr. Call to 108 months, had it used a proper offender score, then he has suffered prejudice by the court, instead, using the improper offender score.[18]

On April 17, 2000, the State filed a motion for reconsideration, arguing that any alleged error was invited and that the Court of Appeals had erroneously applied direct appeal standards in a personal restraint petition, having equated an alleged sentencing error with lack of authority to impose a sentence.19 The Court of Appeals denied the motion on May 18, 2000.20

Petitioner State then sought review by this court, which was granted on December 6, 2000.21

*DISCUSSION*

Petitioner State of Washington contends the Court of Appeals erred in granting Respondent Ira Erwin Call’s personal restraint petition and directing the trial court to resentence him with an offender score of 8 instead of a score of 10 for his first degree robbery conviction.22 Respondent Call argues that the Court of Appeals properly determined his sentence for first degree robbery was calculated upon an erroneous offender score.23 He agrees with the Court of Appeals that because his two prior Texas convictions should have “washed out” under former RCW 9.94A.360(2), the *323incorrect offender score of 10 increased his correct sentence range from 108 to 144 months to the incorrect sentence range of 129 to 171 months, which resulted in a low-end sentence of 129 months instead of a low-end sentence of 108 months, thus incorrectly adding 21 months to his sentence.24 Petitioner does not concede that Respondent’s two prior Texas convictions “wash out” under the SRA.25 Petitioner argues instead that the invited error doctrine precludes a challenge to an agreed offender score and sentence recommendation26 and that Respondent has not met his burden in this personal restraint proceeding of establishing an unconstitutional error amounting to a miscarriage of justice.27

Petitioner contends that Respondent cannot challenge his offender score of 10 because his statement on the plea of guilty form prepared by his lawyer represented to the court that his “standard range on the first degree robbery charge was 129 to 171 months based on the prosecutor’s understanding of [his] criminal history and that the statement of criminal history was correct”; both the prosecutor and the defense asked the court to impose a 129-month sentence; and the plea agreement dismissed five felony counts and a weapons enhancement count.28 Respondent claims he was *324misled and was not made fully aware of the “potential . . . defect” by the plea documents, and that both the court and the State provided him with an inaccurate standard sentence range.29 He asserts the plea agreement required the State to recommend a “low-end range” sentence, and the correct low end is 108 months and not 129 months.30

Petitioner argues the facts of this case are similar to other cases in which courts have declined challenges to plea agreements based upon invited error, waiver, or benefit of the bargain.31 Respondent counters that the cases cited by the State are distinguishable, and instead offers other cases he considers analogous.32

A similar argument advanced by Petitioner in this case was rejected by this court in *In re Personal Restraint of Thompson.**33***In that case, the State argued that “where a defendant has bargained for and received a benefit in exchange for his plea, he must adhere to his bargain.”34 In *325addressing the issue in *Thompson,**35***this court distinguished *State v. Majors,**36***a case relied upon by Petitioner, and *In re Personal Restraint of Barr.**37*

In *Majors,*the defendant stipulated to two prior convictions for the purpose of being declared a habitual offender in exchange for a reduced charge of second degree murder, even though one of the two prior convictions was for a crime committed after the underlying offense for which he was sentenced as a habitual offender.38 On appeal, the defendant claimed the supplemental information was defective and void on its face because one of his prior felony convictions occurred after the underlying offense for which he was sentenced as a habitual offender.39 This court rejected the defendant’s claim and concluded that “[i]nasmuch as [defendant’s] attack . . . was not jurisdictional and [he] was . . . not misled by the technical defect, we hold he must be held to the terms of the plea bargain.”40

This court’s holding in *In re Personal Restraint of Barr*is consistent with *Thompson*and *Majors.*In *Barr,*the petitioner pleaded “guilty” to a reduced charge of indecent liberties in exchange for dismissal of one charge of second degree statutory rape and one charge of third degree statutory rape. The parties to the plea agreement incorrectly believed the indecent liberties statute required the *326victim to be 14-years-old or less. However, the statute actually read “less than 14.”41 In his personal restraint petition, petitioner challenged the validity of his plea because he was not told of a critical element of the charge. In rejecting his claim, this court upheld his plea as both voluntary and intelligent because he “was fully aware that the State’s information alleging indecent liberties was potentially defective. The plea bargain, with its factually suspect information, was completely disclosed to the trial court.”42 This court concluded the petitioner was not misled by the defect before entering the plea agreement.

The reasoning of *Thompson*is persuasive in this case. Although Respondent does not challenge the validity of his plea of “guilty” to first degree robbery,43 and challenges only the length of his sentence, there is nothing in the record to indicate he understood that in pleading “guilty” he was electing to have his two prior Texas convictions counted in calculating his offender score even though they washed out under the SRA. In fact, neither Respondent, the State nor the sentencing court was aware of that fact. This, however, was a technical defect which must be reviewed in terms of its consequences. Respondent could not gain any advantage by intentionally concealing the error before the sentencing court with the intent to raise it later in a personal restraint proceeding. The technical defect was completely inadvertent. Respondent’s criminal history was listed on the various forms reviewed by both parties and the court and neither counsel nor the court was aware an error had been made. However, Respondent was misled by the error to his detriment. The other cases cited *327by Petitioner are clearly distinguishable.44

In this case, the parties and the court were inadvertently misled about Respondent’s offender score, the proper standard sentence range and the actual low-end sentence applicable to the agreed sentence recommendation. A similar situation occurred in *State v.*Walsh,45 in which the defendant agreed to a reduced charge of second degree rape in exchange for dismissal of three other counts and the prosecuting attorney’s promise to recommend a sentence at the low end of the standard range. Defendant’s plea form indicated one prior conviction for vehicular assault.46 Both parties were mutually mistaken about the effect of that history on defendant’s standard range. Although his criminal history was agreed upon, his standard range was higher than that stated on his plea agreement.47 This court observed that “[n]othing in the record shows that Walsh himself was ever advised or realized before the sentencing proceeding that the standard range is not what the parties believed when the plea agreement was reached and accepted by the court.”48 Defendant was sentenced to an exceptional sentence of 136 months and appealed. This court held that his guilty plea was not voluntary based upon the mutual mistake about the standard range sentence49 and that he was entitled to challenge the plea’s *328validity for the first time on appeal.50

The *Walsh*case is analogous to this case in that there was a low-end sentence recommendation by the prosecutor; the parties and the court were not aware that the sentence range in the plea agreement was incorrect; the defendant was unaware of the error; and despite the fact the issue was raised for the first time on appeal, this court concluded the error could be raised in a personal restraint petition.51 However, in that case, the prosecutor’s recommendation was not in accord with the terms of the plea agreement. In this case, the prosecutor’s sentence recommendation of 129 months was consistent with the plea agreement. Nonetheless, like the defendant in Walsh, Respondent Call was not aware of the error in calculating his offender score to determine the 129-month sentence stated in the plea agreement and imposed by the court.

Petitioner claims the invited error doctrine should apply to Respondent Call because the doctrine is not limited to cases in which the defendant knew the nature of the alleged error he was inviting before asking the court to act upon it.52

The doctrine of invited error “prohibits a party from *setting up an error*at trial and then complaining of it on appeal.”53 This court has observed that the invited error doctrine “appears to require affirmative actions by the defendant... [in which] the defendant took knowing and voluntary actions to set up the error; where the defendant’s actions were not voluntary, the court did not apply the doctrine.”54

*329Petitioner argues that Respondent’s prompt filing of his personal restraint petition implies a strategy to set up the error, and claims Respondent was aware of the error all along.55 The State has provided no evidence that Respondent knowingly pleaded “guilty” to an incorrect offender score resulting in an incorrect sentence range.56 From the record in this case we conclude that neither Respondent, the Prosecuting Attorney nor the sentencing court was aware of the error in calculating Respondent’s offender score and standard range. Because there was no apparent affirmative action by Respondent which contributed to the inadvertent error, we conclude he did not invite it.

Respondent has overcome the argument that the invited error doctrine precludes him from seeking collateral review of his 129-month sentence based upon an obviously incorrect offender score. However, he must still demonstrate that he is entitled to relief under RAP 16.4. Under RAP 16.4 “[i]n order to obtain relief by way of personal restraint petition ... a person must establish (1) [the person is] being unlawfully restrained, (2) due to a ‘fundamental defect which inherently results in a complete miscarriage of justice.’ ”57

Petitioner contends the Court of Appeals in this case erroneously applied direct appeal standards of proof in a personal restraint proceeding, having equated a court acting “without statutory authority” with a “fundamental defect” and implicitly finding that such a defect constitutes *330a miscarriage of justice.58 The Court of Appeals, in granting Respondent Call’s personal restraint petition, relied upon a determination by Division One that “ 'a sentencing court acts without statutory authority when it imposes a sentence based on a miscalculated offender score’ ”;59 and this court’s conclusion in a case decided on appeal that “it is the State, not the defendant, which bears the ultimate burden of ensuring the record supports the existence and classification of out-of-state convictions.”60 Respondent argues that Petitioner’s claim is not correct that relief from a sentencing error, like the error in this case, cannot be obtained in a personal restraint proceeding, and cites as authority this court’s decisions in *In re Personal Restraint of Greening**61***and *In re Personal Restraint of Johnson.**62*

In *Greening*petitioner challenged as unlawful the trial court’s imposition of firearm enhancements to run consecutively, rather than concurrently, in accord with Court of Appeals cases decided prior to this court’s decision in *In re Post Sentencing Review of Charles.**63***The issues presented in *Greening*concerned whether the petitioner received the benefit of the significant change in the law as directed by this court in *In re*Charles.64 In *Greening,*the State conceded that petitioner’s firearm enhancements were unlaw*331fully imposed.65 In granting Petitioner Greening’s personal restraint petition, this court identified the applicable rule, RAP 16.4(c)(2),66 and analogized petitioner’s case to other cases in which collateral attack was permitted upon sentences imposed by courts having no statutory authority to impose the particular sentence.67 In that case, the court stated “[w]e have already ruled that unlawful confinement satisfies the ‘fundamental defect’ standard.”68

Under *Greening,*a personal restraint petition can be used to correct a sentence that was unlawfully imposed. Such an unlawful sentence meets the “fundamental defect” standard regardless whether the error is a sentence that improperly runs consecutively instead of concurrently *(Greening)]*a sentence with an improper weapon enhancement *(Carle)]**69***an improper sentence of life without the possibility of paróle *(Moore)'**70***or an improper sentence based upon a miscalculated offender score *(Johnson).*

 This court has held that in the context of sentencing, “illegal or erroneous sentences may be challenged for the first time on appeal.”71 Under this principle, a “challenge to the offender score calculation is a sentencing error *332that may be raised for the first time on appeal.”72 Courts have the duty and power to correct an erroneous sentence upon its discovery.73 This applies similarly to errors raised in a personal restraint petition.

Respondent, acting pro se, did not avail himself of an appeal, but elected to file a personal restraint petition to challenge his miscalculated offender score. He argues the standard range was incorrectly calculated by including his two prior Texas convictions which should not have been used in calculating his offender score. Because the sentencing court must first calculate the correct standard range before imposing a sentence within that range, failure to do so is legal error subject to review.74

 Respondent has established his restraint is unlawful in that he was sentenced to a 129-month term on the basis of an incorrectly calculated offender score. A sentencing court acts without statutory authority under the SRA when it imposes a sentence based upon a miscalculated offender score.75 The law regarding the calculation of Respondent’s offender score when he was sentenced required his two prior Texas convictions to wash out under the SRA, leaving him with a score of 8 and a standard sentence range of 108 to 144 months, and not a standard range of 129 to 171 months based upon the incorrect offender score of 10.

Respondent has also demonstrated a fundamental *333defect under the particular facts of this case.76 The incorrect calculation of an offender score constitutes a fundamental defect in sentencing resulting in a miscarriage of justice which requires relief in a personal restraint proceeding.77 Petitioner makes an argument similar to that proposed by the State in *In re Personal Restraint of Johnson.*In this case, Petitioner argues that Respondent is not entitled to any relief because the 129-month sentence he received still falls within the standard range for the lower offender score of 8 — between 108 to 144 months — and therefore was within the authority of the trial court. In the context of sentencing, the general rule is that “[a] sentence within the standard range for the offense shall not be appealed.”78 But the question must still be decided in this case whether Respondent’s sentence was in fact within the standard range.

Unlike the sentencing judge in *Johnson,*the sentencing judge in this case did not specifically indicate on the record that she intended to sentence Respondent Call at the low end of the standard range. However, the record does indicate the judge believed 129 months was the low end of the standard range based on an offender score of 10. This court has long held “ ‘the existence of an erroneous sentence requires resentencing.’ ”79 This principle also applies to a sentence imposed under the SRA in which an incorrect offender score is used to calculate the standard sentence range.80 The sentencing court should be afforded an opportunity to determine the appropriate sentence based upon accurate information used as a basis for calculating an offender score and in determining the correct sentence range under the SRA. We therefore agree with the Court of *334Appeals and remand this case to the trial court for resentencing.

*SUMMARY AND CONCLUSIONS*

Respondent Ira Erwin Call was sentenced to 129 months for robbery in the first degree upon an incorrectly calculated offender score. His two prior Texas convictions should have washed out under former RCW 9.94A.360(2), resulting in an offender score of 8, instead of an offender score of 10 used by the trial court in determining his sentence based upon agreement of the Prosecuting Attorney and Respondent.

The error in determining his offender score was first noted when Respondent filed a pro se personal restraint petition with the Court of Appeals. In granting the petition, the Court of Appeals correctly determined his sentence for first degree robbery was incorrectly calculated because an offender score of 10 instead of a correct offender score of 8 increased his sentence range from the correct range of 108 to 144 months to the incorrect range of 129 to 171 months, representing an excess of 21 months.

In this case, Petitioner State’s assertion that the invited error doctrine precludes a challenge to a mutually agreed offender score and sentence recommendation is not justified. The doctrine of invited error “prohibits a party from setting up an error at trial and then complaining of it on appeal.” The doctrine requires that a defendant take affirmative action. In this case, there is no evidence that in pleading “guilty” Respondent knowingly agreed to an incorrect offender score or an incorrect sentence range. The record indicates that neither the Prosecuting Attorney, Respondent, nor the sentencing court was aware of the error in calculating Respondent’s offender score and in determining his standard sentence range. We conclude that Respondent did not invite this error.

Courts have the duty and power to correct an erroneous sentence upon its discovery. Respondent, acting pro se, did *335not avail himself of an appeal, but chose to file a personal restraint petition to challenge his miscalculated offender score. The sentencing court is obligated to calculate the correct offender score and determine the correct standard range before imposing a sentence. It is legal error subject to review when that is not done.

Respondent has demonstrated he is entitled to collateral relief under RAP 16.4. He has established his restraint was unlawful in that he was sentenced on the basis of an incorrectly calculated offender score. He has also demonstrated a fundamental defect under the particular facts of this case. The sentencing court should be afforded an opportunity to determine the appropriate sentence based upon accurate information used as a basis for calculating an offender score and in determining the correct sentence range under the SRA.

We affirm the decision of the Court of Appeals, Division Three, which granted the personal restraint petition of Respondent Ira Erwin Call, remanding to the Spokane County Superior Court for resentencing on his conviction for robbery in the first degree, but direct the trial court to determine an appropriate sentence based upon accurate information in calculating an offender score and in determining the correct sentence range under the SRA.

Alexander, C.J., and Johnson, Madsen, Sanders, Ireland, Bridge, Chambers, and Owens, JJ., concur.

1

 Second Am. Information, Spokane County Superior Ct. (Apr. 22, 1999).

2

 Statement of Def. on Plea of Guilty, Spokane County Superior Ct., No. 98-1-02755-1 (Apr. 22, 1999).

3

 Verbatim Report of Proceedings, Spokane County Superior Ct. (Apr. 22, 1999) at 2-11; Pet. for Review at 2. (The additional offenses were one count of second degree robbery and one count of first degree theft. The second degree robbery offense, No. 99-1-00073-1, occurred on December 12, 1998, and involved Respondent taking a purse belonging to Ms. Loan N. Ho. The first degree theft offense, No. 98-1-02774-7, occurred on September 8, 1998, and involved Respondent taking eight Electrolux vacuum cleaners.)

4

 Pet. for Review at 2-3; *see*Second Am. Information, Spokane County Superior Ct. (Apr. 22, 1999); Statement of Def. on Plea of Guilty, Spokane County Superior Ct., No. 98-1-02755-1 (Apr. 22, 1999). (Respondent’s first degree possession of stolen property charge is identified as No. 99-1-00074-0.)

5

 Verbatim Report of Proceedings at 3.

6

*See*“Understanding of Defendant’s Criminal History,” Spokane County Superior Ct. (Apr. 22, 1999); Judgment and Sentence, Spokane County Superior Ct., No. 98-1-02755-1 (Apr. 22,1999). (As an adult, Respondent’s criminal history consists of seven prior nonviolent offenses. Five of those were committed in Washington on the following dates: Theft 2 (July 22, 1997); Forgery (June 14, 1997); Possession of Stolen Property 2 (June 24, 1997); Possession of Stolen Property 2 (Nov. 14, 1995); and Forgery (Nov. 14, 1995).)

7

*Id.*Respondent’s prior offenses committed in Texas in 1987 were Theft of Vehicle (identified as Arr. 101387) and Forgery (identified as Arr. 091587).

8

 On Respondent’s statement on plea of guilty to first degree robbery, the Prosecuting Attorney made the following handwritten recommendation to the court: (1) low end range, (2) drop weapon enhancement, (3) no other charges will be filed from these report numbers . .., (4) restitution on dismissed and uncharged cases if any, and (5) sentences to run concurrently to Nos. 99-1-00073-1 and 98-1-02774-7. Statement of Def. on Plea of Guilty, Spokane County Superior Ct., No. 98-1-02755-1 (Apr. 22, 1999) at 3.

9

*Id.*at 2; Verbatim Report of Proceedings at 3-5 and 22.

10

 Verbatim Report of Proceedings at 3-5 and 22; J. and Sentence, Spokane County Superior Ct., No. 98-1-02755-1 (Apr. 22, 1999) at 3.

11

 Verbatim Report of Proceedings at 24-26 (The court sentenced Respondent to “the low end of the standard sentencing [range]” — 53 and 43 months — on the second degree robbery and first degree theft convictions.); J. and Sentence, Spokane County Superior Ct., No. 98-1-02755-1 (Apr. 22, 1999) at 6.

12

*Id.*

13

 Pers. Restraint Pet., Ct. of Appeals, Division Three, No. 18531-1-III (June 22, 1999). (Respondent is challenging only the offender score on his conviction for first degree robbery.)

14

*Id.*Respondent’s convictions in Texas for theft of a vehicle and forgery, with a sentencing date of December 30, 1987, appear to correspond to Class C felony offenses in Washington under RCW 9A.56.070 and 9A.60.020. The trial court in this case had no information concerning Petitioner’s release from custody in those cases. He was sentenced for his next offense — forgery—on February 1, 1996, which was committed on November 14, 1995. *See*Understanding of Def.’s Criminal History, Spokane County Superior Ct. (Apr. 22, 1999); J. and Sentence, Spokane County Superior Ct., No. 98-1-02755-1 (Apr. 22, 1999).

15

 Undated Letter, Ct. of Appeals, Division Three; Letter from Texas Department of Criminal Justice dated February 22, 2000. The letter from the Texas Department of Criminal Justice stated that Respondent was paroled on the 1987 theft and forgery convictions on May 2, 1988.

16

 Letter from Ct. of Appeals, Division Three (Feb. 2, 2000); *see*Letter from Prosecuting Attorney Kevin M. Korsmo to Ct. of Appeals, Division Three, dated February 11, 2000, questioning whether the information obtained by the Court of Appeals could properly be considered in the case.

17

*In re Pers. Restraint of Call,*No. 18531-1-III, 2000 Wash. App. LEXIS 514, 2000 WL 331925 (Wash. Ct. App. Mar. 30, 2000).

[18]

18 2000 WL 331925, at *1.

19

 Mot. for Recons., Ct. of Appeals, Division Three, No. 18531-1-III (Apr. 17, 2000).

20

 Order Denying Mot. for Recons., Ct. of Appeals, Division Three, No. 18531-1-III (May 18, 2000).

21

 Order, Supreme Ct. of Wash. (Dec. 6, 2000).

22

 Pet. for Review at 1. Petitioner’s brief is submitted as a petition for review and does not address the criteria for review under RAP 13.5(b).

23

 Suppl. Br. of Resp’t at 4.

24

*Id.*Respondent challenges only the length of his sentence.

25

 In contrast, Petitioner asserts that Respondent never proved his Texas convictions washed out because his personal restraint petition did not state the date he was released from custody in those cases and that he did not state whether he was returned to custody on parole violations. Reply Br. of Pet’r at 1. Petitioner cites *State v. Ford,*137 Wn.2d 472, 483, 973 P.2d 452 (1999), in asserting that Respondent was free to stipulate that his two prior Texas convictions would count in his offender score of “10” and he cannot now claim error. Pet. for Review at 8; Suppl. Br. of Pet’r at 3.

26

 Petitioner also asserts “waiver” and “benefit of the bargain” theories. Suppl. Br. of Pet’r at 4-5.

27

 Petitioner argues the Court of Appeals erroneously applied direct appeal standards in a personal restraint proceeding, but concedes in citing *State v. McCorkle,*137 Wn.2d 490, 973 P.2d 461 (1999), that if this issue had been raised on appeal, the State would not prevail because it did not establish in the trial court that the two prior Texas convictions did not wash out. Reply Br. of Pet’r at 1-2.

28

 Suppl. Br. of Pet’r at 6.

29

 Suppl. Br. of Resp’t at 18-19. Respondent does not claim ineffective assistance of counsel.

30

 Respondent argues that under the rule of lenity any ambiguity should be construed in favor of a criminal defendant and against the State. *Id.*at 24-28.

31

 Suppl. Br. of Pet’r at 6-9. Petitioner cites the following cases in support of its claim: *State v. Majors,*94 Wn.2d 354, 616 P.2d 1237 (1980); *In re Pers. Restraint of Breedlove,*138 Wn.2d 298, 979 P.2d 417 (1999); *State v. Cooper,*63 Wn. App. 8, 816 P.2d 734 (1991); *State v. Hilyard,*63 Wn. App. 413, 819 P.2d 809 (1991); *State v. Smith,*82 Wn. App. 153, 916 P.2d 960 (1996); *State v. Young,*63 Wn. App. 324, 818 P.2d 1375 (1991); *State v. Hahn,*100 Wn. App. 391, 996 P.2d 1125 (2000); *State v. Nitsch,*100 Wn. App. 512, 997 P.2d 1000, *review denied,*141 Wn.2d 1030 (2000); *State v. Ford,*137 Wn.2d 472, 973 P.2d 452 (1999).

32

 Suppl. Br. of Resp’t at 16-22. Respondent cites the following cases in support of his claim: *In re Pers. Restraint of Thompson,*141 Wn.2d 712, 10 P.3d 380 (2000); *Majors,*94 Wn.2d 354; *In re Pers. Restraint of Barr,*102 Wn.2d 265, 684 P.2d 712 (1984); *State v. Walsh,*143 Wn.2d 1, 17 P.3d 591 (2001); *In re Pers. Restraint of Greening,*141 Wn.2d 687, 9 P.3d 206 (2000); *In re Pers. Restraint of Johnson,*131 Wn.2d 558, 933 P.2d 1019 (1997).

33

141 Wn.2d 712, 10 P.3d 380 (2000).

34

*Id.*at 720. In that case, the defendant pleaded “guilty’ to first degree rape of a child for conduct that was not criminal at the time he committed it because the statute outlawing the conduct had not yet been enacted. *In re Thompson,*141 Wn.2d at 716. He challenged his conviction based upon the invalid charge in a personal restraint petition. He argued he was not aware he was pleading guilty to *325an invalid charge in exchange for having two other counts of first degree rape of a child dismissed. *Id.*at 720.

35

 In *Thompson,*when explaining its conclusion in *Majors,*this court stated its holding was contingent upon the defendant in *Majors*not being misled by a technical defect before entering into a plea agreement. *Id.*at 720.

36

94 Wn.2d 354, 616 P.2d 1237 (1980).

37

102 Wn.2d 265, 684 P.2d 712 (1984).

38

*Majors,*94 Wn.2d at 355-56.

39

*Id.*

40

*Id.*at 359. The court stated that “[o]n the record before us, it is plain that [defendant] was represented by counsel at all stages of the plea bargaining; that he freely admitted the two prior convictions which formed the basis of the habitual criminal charge; and that he understood that he would receive a life sentence as a result of his plea.... In effect, petitioner bargained for a sentence by accepting a habitual criminal status.” *Id.*at 357.

41

*Barr,*102 Wn.2d at 267.

42

*Id.*at 270.

43

 In Respondent’s Supplemental Brief (at 40) he raises for the first time the issue of an alleged breach of the plea agreement by the State. His personal restraint petition before the Court of Appeals made no such claim. He did not challenge the validity of his plea and did not seek to withdraw his plea. He therefore cannot raise those issues now.

44

 Petitioner cites the following cases for the proposition that Respondent must be held to the negotiated plea agreement and cannot collaterally attack the offender score and sentence range he bargained for: *In re Pers. Restraint of Fleming,*129 Wn.2d 529, 919 P.2d 66 (1996); *Breedlove,*138 Wn.2d 298, 312; *Ford,*137 Wn.2d 472; *Cooper,*63 Wn. App. 8; *Hilyard,*63 Wn. App. 413; *Smith,*82 Wn. App. 153; *Young,*63 Wn. App. 324; *Hahn,*100 Wn. App. 391; *Nitsch,*100 Wn. App. 512.

45

143 Wn.2d 1, 17 P.3d 591 (2001).

46

*Walsh,*143 Wn.2d at 4.

47

*Id.*at 4-5.

48

*Id.*at 5.

49

*Id.*at 8.

50

*Id.*at 4.

51

*In re Pers. Restraint of Hews,*99 Wn.2d 80, 660 P.2d 263 (1983).

52

 Reply Br. of Pet’r at 2-5.

53

*Thompson,*141 Wn.2d at 723 (some quotations marks omitted) (quoting *Breedlove,*138 Wn.2d at 312 (quoting *State v. Wakefield,*130 Wn.2d 464, 475, 925 P.2d 183 (1996) (quoting *State v. Pam,*101 Wn.2d 507, 511, 680 P.2d 762 (1984), *overruled on other grounds by State v. Olson,*126 Wn.2d 315, 893 P.2d 629 (1995)))).

54

*Thompson,*141 Wn.2d at 724. This court relied upon four cases: *State v.**329*Wakefield,*130 Wn.2d at 475; *State v. Boyer,*91 Wn.2d 342, 345, 588 P.2d 1151 (1979); *Breedlove,*138 Wn.2d at 312; *Cooper,*63 Wn. App. 8, 9, 14.

55

 Reply Br. of Pet’r at 12.

56

*See Thompson,*141 Wn.2d at 725.

57

*Fleming,*129 Wn.2d at 532 (quoting *In re Pers. Restraint of Cook,*114 Wn.2d 802, 812, 792 P.2d 506 (1990)) (In a personal restraint petition alleging a *constitutional error,*a petitioner must satisfy the threshold burden of demonstrating the claimed error shows “actual and substantial prejudice.” However, when a *nonconstitutional error*is alleged, the burden is higher, and the claimed error must demonstrate a “fundamental defect which inherently results in a complete miscarriage of justice.”).

58

 Pet. for Review at 5.

59

*In re Pers. Restraint of Call,*No. 18531-1-III, 2000 Wash. App. LEXIS 514, **3,*2000 WL 331925, at *1 (Wash. Ct. App. Mar. 30, 2000) (quoting *State v. Roche,*75 Wn. App. 500, 513, 878 P.2d 497 (1994)).

60

*Ford,*137 Wn.2d at 480.

61

141 Wn.2d 687, 9 P.3d 206 (2000).

62

131 Wn.2d 558, 933 P.2d 1019 (1997).

63

135 Wn.2d 239, 245-46, 955 P.2d 798 (1998) (Under former RCW 9.94A.310(3)(e) and former RCW 9.94A.400(1)(a), firearm enhancements in nonexceptional sentences must run concurrently.).

64

 In *Greening,*this court was asked to determine whether petitioner was entitled to relief under RAP 16.4(c)(2); whether his petition was time barred under RCW 10.73.090; and whether it was improperly successive under RCW 10.73.140, RAP 16.4(d), or the abuse of writ doctrine. *Greening,*141 Wn.2d at 691.

65

*Id.*

66

 A petitioner is entitled to collateral relief if petitioner’s “sentence . . . was imposed or entered in violation of the . .. laws of the State of Washington.”

67

*Greening,*141 Wn.2d at 691-93, 692 (Relief granted under RAP 16.4(c)(2) “ ‘[blecause the trial court. .. imposed an erroneous sentence, and since the error has now been discovered, the court has both the power and the duty to correct it.’ ’’Xquoting *In re Pers. Restraint of Carle,*93 Wn.2d 31, 33-34, 604 P.2d 1293 (1980)); *see also In re Pers. Restraint of Williams,*111 Wn.2d 353, 361-62, 759 P.2d 436 (1988) (citing *Carle*and RAP 16.4(c)(2) (holding that “where a defendant was sentenced in violation of a provision of the state sentencing law],] [s]uch an error may be raised in a personal restraint petition”)); *In re Pers. Restraint of Moore,*116 Wn.2d 30, 33, 803 P.2d 300 (1991) (Petitioner pleaded guilty and was sentenced to life “without” the possibility of parole where the court’s authority extended only to a sentence of life “with” the possibility of parole. The court noted that “failure to correct the defect could result in a denial of petitioner’s due process rights,” and observed that, “Confinement beyond that authorized by statute is exactly the kind of fundamental defect which the rule we announced in *[In re Pers. Restraint of Cook,*114 Wn.2d at 812,] was aimed at remedying.”).

68

*Greening,*141 Wn.2d at 693 n.5 (citing *Moore,*116 Wn.2d at 33; *Johnson,*131 Wn.2d at 568-69).

69

*In re Pers. Restraint of Carle,*93 Wn.2d 31, 604 P.2d 1293 (1980).

70

*In re Pers. Restraint of Moore,*116 Wn.2d 30, 803 P.2d 300 (1991).

71

*Ford,*137 Wn.2d at 477.

72

*Roche,*75 Wn. App. at 513.

73

*See State v. Smissaert,*103 Wn.2d 636, 639, 694 P.2d 654, *review denied,*104 Wn.2d 1026 (1985); *Ford,*137 Wn.2d at 477 (quoting *State v. Loux,*69 Wn.2d 855, 858, 420 P.2d 693 (1966) (“[T]his court “has the power and duty to correct the error upon its discovery even where the parties not only failed to object but agreed with the sentencing judge”)), *overruled in part by State v. Moen,*129 Wn.2d 535, 545, 919 P.2d 69 (1996)).

74

*See State v. Parker,*132 Wn.2d 182, 189, 937 P.2d 575 (1997). Similarly, CrR 4.2 requires that a defendant be informed of the maximum term to which he may be sentenced upon a guilty plea. *See also State v. Barton,*93 Wn.2d 301, 609 P.2d 1353 (1980).

75

*Roche,*75 Wn. App. at 513; *State v. Brown,*60 Wn. App. 60, 70, 802 P.2d 803 (1990), *review denied,*116 Wn.2d 1025, 812 P.2d 103 (1991).

76

*Johnson,*131 Wn.2d at 569.

77

*Id.*

78

 Former RCW 9.94A.210(1) (1989); see *also State v. Mail,*121 Wn.2d 707, 710, 854 P.2d 1042 (1993).

79

*Ford,*137 Wn.2d at 485 (quoting *Brooks v. Rhay,*92 Wn.2d 876, 877, 602 P.2d 356 (1979)).

80

*Id.*