
525 N.W.2d 576 (1994)
STATE of Minnesota, Respondent,
v.
Rodney Allen MILLER, Appellant.
No. C3-94-360.
Court of Appeals of Minnesota.
December 27, 1994.
*578 Hubert H. Humphrey, III, Atty. Gen., St. Paul, Michael O. Freeman, Hennepin County Atty., Mark V. Griffin, Asst. County Atty., Minneapolis, for respondent.
Susan J. Andrews, Asst. State Public Defender, St. Paul, for appellant.
Considered and decided by DAVIES, P.J., and AMUNDSON and THOREEN,[*] JJ.

OPINION
AMUNDSON, Judge.
Appellant argues that his racketeering conviction should be reversed because (1) the state failed to bring an untried charge to trial within six months; (2) the state failed to show good cause for delaying disposition of the untried charges; and (3) the sentencing court erred by imposing a sentence agreed upon by the parties without calculating his criminal history score. We agree and vacate appellant's conviction.

FACTS
Appellant Rodney Miller has been an inmate at the Stillwater correctional facility since 1984. He is serving a 134 month sentence on a murder conviction. In 1991, a police investigation linked him to a prison drug smuggling operation and to three murders committed in Hennepin County by his brother, Gary Miller. Prison officials placed Rodney Miller in segregation because of his possible involvement.
On July 31, 1991, the state charged Rodney Miller with three counts of conspiracy to commit murder. The following day, the state charged him with one count of racketeering. In August 1991, Miller requested a speedy disposition of the charges under the Uniform Mandatory Disposition of Detainers Act (UMDDA), Minn.Stat. § 626.292 (1990), which requires all untried complaints to be brought to trial within six months of request unless good cause is shown. He also requested the appointment of counsel. The record reflects that the Hennepin County Attorney received Miller's request around August 8, 1991.
Miller did not make his first appearance until January 15, 1992. Two days later, Miller again appeared before the court, and Mark Wernick was formally appointed as his attorney. Wernick indicated that prosecutor Kevin Johnson had told him that February 5 was the end of the six month UMDDA period. At this time, Johnson represented to the court that the state was ready for trial. Wernick stated that he was not prepared to try the case within the next two weeks. Wernick noted that the issue was whether the reasons for the delay were sufficient to go past the six month time limit. The court continued the hearing to February 4, 1992.
At the February 4 hearing, Wernick explained that he was not ready to try the case the next day. The court granted the state's motion for a continuance, finding "there is good cause to extend this period of time and to schedule this matter for trial on June 22." Four days before trial, the state dismissed both complaints against Miller. The next day, the state charged Miller with three counts of first degree murder. Each count was based on the same allegations stated in the previous complaint. Miller again requested a speedy disposition under the UMDDA. The state again dismissed the first degree murder complaint on October 2, 1992, after the primary police investigator *579 was seriously injured in a motorcycle accident.
No charges were pending against Miller from October 1992 until July 1993. During this time, however, Miller remained imprisoned in segregation. On July 20, 1993, a grand jury indicted Miller for three counts of first degree murder. The indictment was identical to the counts charged in the state's earlier complaint. Miller again requested a speedy disposition of the indictment.
At the November omnibus hearing, the court denied Miller's motion to dismiss the indictment pursuant to the UMDDA and scheduled trial for November 22, 1993. On November 23, the parties reached a plea agreement. Miller agreed to plead guilty to racketeering in return for an executed sentence of 15 years and dismissal of the murder indictment.
At the plea hearing, Miller again asserted his claim for violation of his speedy trial rights, but the court accepted Miller's guilty plea and imposed a 15-year concurrent, executed sentence with credit given from August 1, 1991. This appeal followed.

ISSUES
1. Does an inmate waive his speedy disposition claim by pleading guilty?
2. Did the state violate the inmate's statutory right to a speedy disposition of untried charges?
3. Did the trial court err by imposing a sentence that the parties agreed upon without determining the criminal history score or the severity level of the offense?

ANALYSIS

I. Waiver

As a preliminary matter, we must determine whether Miller waived his UMDDA claim by pleading guilty. Generally a guilty plea by a counseled defendant operates as a waiver of all nonjurisdictional defects arising before the entry of the plea. State v. Lothenbach, 296 N.W.2d 854, 857 (Minn.1980). Whether the right to a speedy disposition is a jurisdictional question has not been addressed by Minnesota courts.
The UMDDA itself provides that "[i]f, after such a request, the indictment or information is not brought to trial within [six months] or within additional time for good cause, no court of this state shall any longer have jurisdiction thereof." Minn.Stat. § 629.292, subd. 3 (1990) (emphasis added). The statutory language reasonably implies that the defendant's right to speedy disposition of untried charges is jurisdictional. The Michigan Supreme Court stated succinctly that "a [d]efendant may always challenge whether the state had a right to bring the prosecution in the first place." People v. Johnson, 396 Mich. 424, 240 N.W.2d 729, 738 (1976), cert. denied, 429 U.S. 951, 97 S.Ct. 370, 50 L.Ed.2d 319 (1976). In construing the issue, the court noted:
Why an accepted, unqualified plea of guilty should cure error that a guilty verdict or finding would not has probably been best answered by the Supreme Court's observation that a guilty plea is different "in purpose and effect from a mere admission or an extra-judicial confession; it is itself a conviction."
Id. (quoting Kercheval v. United States, 274 U.S. 220, 223, 47 S.Ct. 582, 583, 71 L.Ed. 1009 (1927)). Moreover, Miller consistently asserted that he was not waiving his right to appeal the detainer issue. Thus, we hold that the right to a speedy disposition is jurisdictional and that Miller did not waive his right to appeal the detainer issue by pleading guilty.

II. UMDDA Violation

The construction of a statute is a question of law, reviewed de novo by appellate courts. State v. Huynh, 504 N.W.2d 477, 481 (Minn.App.1993) (citing Frost-Benco Elec. Ass'n v. Minnesota Pub. Utils. Comm'n, 358 N.W.2d 639, 642 (Minn.1984)), aff'd, 519 N.W.2d 191 (Minn.1994).
The UMDDA provides that,
any person who is imprisoned in a penal or correctional institution * * * may request final disposition of any untried indictment or complaint pending against the person in this state.
* * * * * *

*580 Within six months after the receipt of the [prisoner's] request * * *, or within such additional time as the court for good cause shown in open court may grant, the prisoner or counsel being present, the indictment or information shall be brought to trial. * * * If, after such a request, the indictment or information is not brought to trial within that period, no court of this state shall any longer have jurisdiction thereof, nor shall the untried indictment or information be of any further force or effect, and the court shall dismiss it with prejudice.
Minn.Stat. § 629.292, subds. 1, 3.
Under the UMDDA, the state had until February 8, 1992 to bring Miller's case to trial. Minn.Stat. § 629.292, subd. 3 (state's six month time limit starts to run upon receipt by the court and prosecuting attorney of inmate's UMDDA request); see also State v. Hamilton, 268 N.W.2d 56, 60 (Minn.1978) (six month period begins to run from date UMDDA request is received  not from date defendant is informed of the indictment).

A. The first delay
On February 4, 1992, the court extended the time for trial for good cause. Whether good cause exists for extending the UMDDA time limit is a subjective, factual question within the discretion of the trial court. See State v. Rainer, 411 N.W.2d 490, 495 (Minn.1987) (ruling on a request for continuance is within trial court's discretion). The trial court noted the recency of appointment of defense counsel, the potential ineffective assistance of counsel claim, and the congested court calendar as reasons supporting an extension of Miller's trial date. Moreover, defense counsel consented to a trial date of June 22, approximately four and a half months beyond the 180-day time limit. But the record also reflects that, even though defense counsel consented to the June 22 trial date, the parties and the court assumed that Miller was not waiving his speedy trial rights.

B. The second delay
The record reveals no legitimate reason for the state's dismissal on June 18, 1992 and the subsequent recharge on June 19, 1992. The state apparently assumed that the dismissal of the conspiracy and racketeering charges and the filing of a new complaint for first degree murder allowed the state another six months under the UMDDA to try the murder complaint. No Minnesota appellate court has addressed this precise issue, but the Minnesota Supreme Court's interpretation of an analogous state criminal procedure rule provides some guidance in deciding the merits of the state's assumption.
A defendant charged with a misdemeanor "must be tried within 60 days from the date of the demand" unless good cause is shown. Minn.R.Crim.P. 6.06; see also Minn. R.Crim.P. 11.10 (same rule for felonies and gross misdemeanors). The Minnesota Supreme Court has previously rejected the claim that the "60 days required by [Minn. R.Crim.P. 6.06] should be calculated afresh for the formal complaint." State v. Kasper, 411 N.W.2d 182, 184 (Minn.1987). Rather, the court held that "the dismissal and refiling of the charges did not shorten [the defendant's] wait for trial and so should not affect the calculations." Id. The supreme court agreed with the ABA Standards for Criminal Justice that "if charges are dismissed by the prosecutor and new charges are brought, the time period should not start again from zero with the new complaint." Id. (citing II ABA Standards for Criminal Justice 12-2.3(f) (2d ed. Supp.1986)).[1]

C. The third delay
The state again dismissed the murder complaint on October 2, 1992 because the primary police investigator was unable to testify after he was injured in a motorcycle accident. *581 The notice of dismissal stated that the "matter would be presented to the next Grand Jury panel when Sgt. Wagenknecht returns to duty."
Sergeant Wagenknecht returned to duty on November 5, 1992. On December 15-16, 1992, he testified for two full days at Miller's prison disciplinary hearing. The delay due to Wagenknecht's injury was justifiable. See Hamilton, 268 N.W.2d at 62 (trial court's continuance is reasonable where witnesses unavailable and delay was minimal and not prejudicial to defendant).[2] However, the state did not present Miller's case to the Grand Jury until July 1993. Again, the record reveals no legitimate reason why the state failed to proceed with obtaining an indictment during the period from November 1992 until July 1993.
At the November 1993 hearing, Johnson explained the delay: First, he acknowledged that he knew Sergeant Wagenknecht returned to duty in November 1992 and "probably was physically capable of testifying" but that "it would have been very painful for him to have to hobble around." Second, Johnson stated that he picked up two high profile first degree murder cases. Third, he testified that he was transferred from the Criminal Division to the Mental Health Division of the Hennepin County Attorney's office in January 1993. All of his routine criminal cases were reassigned but he kept the pending first degree murder files. Fourth, Johnson pointed out that he was appointed chief administrative law judge for the State of Minnesota in July 1993. He noted that he "felt an obligation since [he] was more familiar with the case than anyone else in the County Attorney's Office to do the Grand Jury presentation."

D. The Barker Factors
In order to determine whether delay violated an inmate's right to a speedy disposition, a court considers the (1) length of delay; (2) reason for delay; (3) defendant's assertion of his right; and (4) prejudice to the defendant. Barker v. Wingo, 407 U.S. 514, 530, 92 S.Ct. 2182, 2191-92, 33 L.Ed.2d 101 (1972). While Barker specifically dealt with constitutional rights, we believe that the Barker factors are applicable to our UMDDA statute. The court noted in Barker:
Nothing we have said should be interpreted as disapproving a presumptive rule adopted by a court in the exercise of its supervisory powers which establishes a fixed time period within which cases must normally be brought.
Barker, 407 U.S. at 530 n. 29, 92 S.Ct. at 2192 n. 29; accord State v. Stitzel, 351 N.W.2d 409, 411 (Minn.App.1984) (acknowledging that supreme court has followed Barker and promulgated Minn.R.Crim.P. 6.06 three years after Barker). Moreover, in enacting the UMDDA, the legislature
intended to go beyond constitutional minimum standards and provide (a) a specific mechanism for an inmate to assert his right to a speedy trial; (b) a general rule that inmates should be brought to trial within 6 months; and (c) a definite consequence for undue delay  dismissal of the charge irrespective of its gravity. While these elements of legislative intent must be given effect, the act also evinces a legislative intent to preserve an element of flexibility by making an exception to the 6-month rule where a continuance is granted for "good cause." Our interpretation of the act must give reasonable effect to this exception without licensing its use to nullify the general rule.

State v. Hamilton, 268 N.W.2d 56, 61 (Minn. 1978) (emphasis added).
Because the court found good cause to extend the initial trial date and because the defense consented to this continuance, the pertinent time period for this court to apply the Barker factors includes the second and *582 third delays running from June 19, 1992 until November 24, 1993.

E. Application of Barker

1. Length of delay: Under Kasper, the length of delay is 18 months. See 411 N.W.2d at 184-85 (dismissal and refiling of charges does not shorten defendant's wait for trial and should not affect the speedy trial calculations).
We recognize that the United States Supreme Court has held:
Once charges are dismissed, the speedy trial guarantee is no longer applicable. At that point, the formerly accused is, at most, in the same position as any other subject of a criminal investigation.
United States v. MacDonald, 456 U.S. 1, 8-9, 102 S.Ct. 1497, 1502, 71 L.Ed.2d 696 (1982). In MacDonald, an army captain was charged in May 1970 with murdering his pregnant wife and two children on a military reservation. Later that year, the charges were dropped and he was honorably discharged on the basis of hardship. In January 1975, a grand jury returned an indictment charging him with the three murders.
We believe this case is factually distinguishable from MacDonald. First, unlike the defendant in MacDonald, the state's dismissal of the charges against Miller did not place him in the same position as any other subject of a criminal investigation. Even though Miller was already in prison, the State of Minnesota placed a detainer on him that remained even after the charges were dismissed. The Supreme Court has cautioned courts not to "overlook the possible impact pending charges might have on [an inmate's] prospects for parole and meaningful rehabilitation." Moore v. Arizona, 414 U.S. 25, 27, 94 S.Ct. 188, 190, 38 L.Ed.2d 183 (1973). Here, the detainer operated to keep the state apprised of Miller's scheduled release date. The County Attorney's office did not drop the detainer on Miller until March 22, 1993, and Miller also remained confined to segregation from May 1991 until August 1993.
Second, the court noted in MacDonald that the delay in that case "was caused primarily by MacDonald's own legal maneuvers." 456 U.S. at 11, 102 S.Ct. at 1503; see Kasper, 411 N.W.2d at 185 (describing dismissal and refiling of charges as "legal maneuvering" by state). In this case, all delays (after the first delay) were caused by the state.
Third, the court observed in MacDonald: This is not a case where the Government dismissed and later reinstated charges to evade the speedy trial guarantee. The Army clearly dismissed its charges because the Commanding General of MacDonald's unit, following the recommendation of the Article 32 investigating officer, concluded that they were untrue. * * * The care obviously given to the matter by the Justice Department is certainly not any indication of bad faith or deliberate delay.
Id. at 10 n. 12, 102 S.Ct. at 1503 n. 12. In this case, however, we can only conclude that the purpose of the dismissal and reinstatement of charges was to avoid the six month time limit. Cf. In re Welfare of G.D., 473 N.W.2d 878 (Minn.App.1991) (when the state, acting in good faith, dismisses a delinquency petition and refiles at a later date, the court must not begin the 60-day period for speedy trial at zero, but must resume counting at the day it left off at the time of dismissal).
Thus we conclude that the length of delay here should be calculated according to Kasper.
2. Reason for delay: All of the delay  from June 19, 1992 until November 24, 1993  can be attributed to the state. The delay was not deliberate but rather was neglectful. Even though the delay was not intentional, it must be weighed against the state. See United States v. Avalos, 541 F.2d at 1111-14 (distinguishing three types of delay  deliberate, negligent and justifiable). While Johnson asserted that Miller's attorney could have initiated the procedure sooner by filing a writ of habeas corpus ad testificandum, the statute does not place the burden on the defendant to ensure that the government affords him a speedy trial.
3. Defendant's assertion of right: Miller asserted his right to a speedy trial three times. His persistence is important. See State v. Jones, 392 N.W.2d 224, 235 (Minn. 1986) (citing Barker, 407 U.S. at 531-32, 92 S.Ct. at 2192-93) (defendant's assertion of his *583 speedy trial right is "entitled to strong evidentiary weight.")).
4. Prejudice to defendant because of delay: Contrary to appellant's appeal brief, the defendant must show prejudice as a result of the delay. State v. Borough, 287 Minn. 482, 484, 178 N.W.2d 897, 898 (1970) ("The rule in this state has been that prejudice must be made to appear.").
The record reveals that Miller was prejudiced by the delay. He was confined in segregation. He was unable to participate in prison work programs and other rehabilitation. His scheduled release date was changed pending the outcome of the trial and disciplinary proceedings. Prison officials refrained from holding the prison disciplinary hearing until December 15-16, 1992. Because the criminal trial had not taken place, Miller invoked his Fifth Amendment right against self-incrimination. Miller lost whatever procedural opportunities he may have benefitted from in the prison disciplinary hearings.
Where a defendant's speedy trial rights have been violated, "dismissal of the charge irrespective of its gravity" is the only remedy. Hamilton, 268 N.W.2d at 61. The UMDDA exists for no other reason than to establish a prisoner's right to a speedy disposition of untried charges. Permitting the state to continue prosecution under the circumstances presented in this case denigrates a "clear and workable [statute that] sets out a reasonable period of time and a simple and fair procedure to protect a defendant's right to a speedy trial." Kasper, 411 N.W.2d at 185. Thus, Miller's conviction must be vacated.

III. Sentencing

Given our disposition, we need not address the sentencing issue raised on appeal.

DECISION
Due to the violation of the UMDDA, Miller's conviction is vacated.
Conviction Vacated.
NOTES
[*]  Retired judge of the district court, serving as judge of the Minnesota Court of Appeals by appointment pursuant to Minn. Const. art. VI, § 10.
[1]  The ABA standards provide:

If dismissal by the prosecutor were to operate so as to begin the time running anew upon a subsequent charge of the same offense, this "would open a way for the complete evasion" of the speedy trial guarantee.
II ABA Standards for Criminal Justice 12-2.3(f) (2d ed. Supp.1986) (quoting Brooks v. People, 88 Ill. 327, 330 (1878)).
[2]  Prosecutorial delay because of unavailability of a witness is not weighed heavily against the state. United States v. Avalos, 541 F.2d 1100, 1114 (5th Cir.1976), cert. denied 430 U.S. 970, 97 S.Ct. 1656, 52 L.Ed.2d 363 (1977). In Avalos, the court defined three types of delay: deliberate delay (tactical maneuvering); negligent delay (negligence or overcrowded courts); and justifiable delay (missing witness). Id. at 1111-14. The court noted: "[A] valid reason, such as a missing witness, should serve to justify appropriate delay." Id. (citing Barker v. Wingo, 407 U.S. 514, 531, 92 S.Ct. 2182, 2192, 33 L.Ed.2d 101 (1972)).
