
457 N.W.2d 215 (1990)
Ronald James BALLWEBER, Petitioner, Appellant,
v.
STATE of Minnesota, Respondent.
No. C2-90-244.
Court of Appeals of Minnesota.
June 5, 1990.
*216 John M. Stuart, Public Defender, Susan K. Maki, Asst. Public Defender, Minneapolis, for appellant.
Hubert H. Humphrey, III, Atty. Gen., St. Paul, Hugh Cameron, Itasca County Atty., Grand Rapids, for respondent.
Considered and decided by KALITOWSKI, P.J., and CRIPPEN and GARDEBRING, JJ.

OPINION
CRIPPEN, Judge.
Appellant Ronald James Ballweber challenges the calculation of his criminal history score and the denial of jail credit on the longer of two consecutive sentences. We affirm.

FACTS
Appellant was convicted of theft in May 1985. The court stayed imposition of sentence on conditions including 90 days time in jail. Before serving the jail time appellant absconded. He was captured and pled guilty to escape in December 1985, and the court imposed but stayed a 15 month sentence.
In August 1989, the court revoked stay of appellant's sentences. The court imposed and ordered execution of a one year and one day sentence on the theft charge. On appellant's request, concurrent execution of the escape sentence was also ordered. The court gave appellant credit for jail time served on the theft sentence, but withheld credit on the escape sentence.
In December 1989, appellant filed a petition for postconviction relief. He argued the court incorrectly computed his criminal history score when it imposed the 15 month escape sentence, and that he should receive jail credit on the escape sentence for all time served in jail since his arrest after his escape. The trial court held that the 15 month sentence was correct, that appellant waived the right to appeal, and that appellant had agreed that he would receive no credit for jail time served. Appellant challenges this order.

ISSUES
1. Is the addition of a criminal history point for committing the offense while in custody or under supervision proper when the current offense is escape from custody?
2. Does appellant's purported waiver of appeal preclude this court from reviewing his sentence?
3. Is appellant entitled to jail credit?


*217 ANALYSIS

I). Calculation of Criminal History.
Appellant claims the court improperly assigned a "custody point" in calculating the criminal history score for the escape sentence. Escape from custody is a level III offense. With a criminal history score of one, the presumptive Guidelines sentence is 13 months; with a score of two, the sentence is 15 months.[1] The trial court assigned appellant a criminal history score of two: one for the theft conviction, and one for a custody point.
The relevant section of the Guidelines provides:
The offender is assigned one point if he or she was on probation or parole or confined in a jail, workhouse, or prison following conviction of a felony or gross misdemeanor, or released pending sentencing at the time the felony was committed for which he or she is being sentenced.
Minnesota Sentencing Guidelines II.B.2. Here, respondent committed the crime of escape while on release pending commitment. As such, this section of the Guidelines expressly calls for the addition of a criminal history point in this case.
Appellant argues that assigning a point for the escape charge exaggerates the criminality of his conduct because being in custody is an element of the offense. The supreme court has held that an element of the offense, insofar as it is used as a factor to determine the severity of the offense, may not also be used to justify an upward departure from the Guidelines. See State v. Peterson, 329 N.W.2d 58, 60 (Minn.1983). This case, however, involves no departure from the Guidelines. Rather, it involves the application of an explicit provision to arrive at a sentence within the provisions of the Guidelines. If the calculation constitutes a flawed policy, the remedy lies in alteration of the guidelines. Adding a point to appellant's criminal history score was proper.

II). Waiver of Right to Appeal.
During the 1985 sentencing hearing, the court stated,
if it turns out that 15 months is not the right sentence, you're not going to be able to appeal it, neither is the State, you both understand that? You understand that?
THE DEFENDANT: Yes, Your Honor.
THE COURT: And you understand that?
[the prosecutor]: Yes, Your Honor.
Later in the hearing, a similar exchange occurred. The state argues that, with these exchanges, appellant waived his right to appeal from the sentence and that this court should apply that waiver to preclude review.
It is generally possible to forfeit constitutional or statutory rights with a knowing, intelligent, and voluntary waiver. See, e.g., Edwards v. Arizona, 451 U.S. 477, 482, 101 S.Ct. 1880, 1883, 68 L.Ed.2d 378 (1981) (waiver of right to counsel). In addition, it is settled law that a guilty plea operates as a waiver of all nonjurisdictional defects arising prior to the entry of the plea. State v. Ford, 397 N.W.2d 875, 878 (Minn. 1986). However, under Minnesota sentencing law, these principles do not govern this situation.
Minnesota law gives a criminal defendant an unconditional right to appeal from any sentence imposed or stayed. Minn.Stat. § 244.11 (1988). In addition, under the Minnesota Sentencing Guidelines, it is the role of the court to determine the appropriate sentence. State v. Garcia, 302 N.W.2d 643, 647 (Minn.1981). Vindication of the Guidelines' stated goals of establishing "rational and consistent sentencing standards," of reducing sentencing disparity, and providing uniformity in sentencing requires appellate review of trial court sentencing decisions. See ABA Standards on Criminal Justice 20-1.1 (2nd ed. 1980) (importance of appellate review of sentencing). *218 The unconditional nature of the statutory right and the importance of judicial determination of sentences under the Minnesota sentencing scheme precludes us from holding that a defendant in Minnesota may waive the right to appeal from a sentence.
This analysis compels us to reject law from other states which allows a defendant to waive the right to appeal from a sentence. See People v. Olson, 216 Cal. App.3d 601, 264 Cal.Rptr. 817 (Cal.Ct.App. 1989); People v. Nichols, 143 Ill.App.3d 673, 97 Ill.Dec. 870, 493 N.E.2d 677 (Ill. App.Ct.1986); People v. Seaberg, 74 N.Y.2d 1, 541 N.E.2d 1022, 543 N.Y.S.2d 968 (N.Y. 1989). But see People v. Butler, 43 Mich. App. 270, 204 N.W.2d 325 (Mich.Ct.App. 1972). New York, which has indeterminate sentencing, strictly enforces waivers of appeal of sentences in cases where defendants appeal on the ground their sentences were excessive, stressing the role such waivers have in negotiating plea bargains. See Seaberg, 74 N.Y.2d at 6, 541 N.E.2d at 1025, 543 N.Y.S.2d at 972. However, a New York defendant may not waive the right to challenge the legality of the sentence. People v. Francabandera, 33 N.Y.2d 429, 434 n. 2, 310 N.E.2d 292, 294 n. 2, 354 N.Y.S.2d 609, 612 n. 2 (N.Y.1974), cited in Seaberg, 74 N.Y.2d at 6, 541 N.E.2d at 1025, 543 N.Y.S.2d at 971. Under the Francabandera rule, a defendant retains the right to argue that a sentence is not within statutory limits, or is otherwise illegal.
Under Minnesota law, all felony sentencing is governed by the Sentencing Guidelines. Therefore, Minnesota sentencing is determinate, not indeterminate, and the court's role in determining the sentence under the Guidelines preempts most, if not all, negotiation over sentence length. Accordingly, sentencing appeals here, like those under the Francabandera decision, necessarily involve challenges to the legality of the sentence, and it would subvert the purposes of the Sentencing Guidelines to allow waiver of the right to appeal a sentence.

III). Jail Credit.
Appellant argues he is entitled to jail credit for all time served in jail since his arrest on December 9, 1985. A defendant is entitled to credit for "all time spent in custody in connection with the offense or behavioral incident for which sentence is imposed." Minn.R.Crim.P. 27.03, subd. 4(B). Here, appellant served 21 days in jail in connection with the escape charge: the time between his arrest and his plea and sentence. Thus, he is entitled to 21 days jail credit on his concurrent escape sentence.

DECISION
Under Minnesota sentencing law, it is not possible to waive the right to appeal a sentence, and appellant did not do so. The court properly included a custody point in the calculation of appellant's criminal history score on his escape conviction, and properly sentenced him to 15 months. Appellant is entitled to 21 days of jail credit on the escape sentence.
Affirmed as modified.
NOTES
[1]  Under the Guidelines, criminal history points do not enter into an escape sentence to be executed consecutively with another sentence. Minnesota Sentencing Guidelines II.F. Thus, the discussion here is singularly germane to the trial court's choice for concurrent execution of the theft and escape sentences.
