After breaking into a local bank, appellant Monte Malone was charged with felonious destruction of property (D.C.Code § 22-403 (1996)) and second-degree burglary (D.C.Code § 22-1801(b) (1996)). On January 7, 1986, following a non-jury trial on stipulated facts, appellant was found not guilty by reason of insanity (“NGI”). At a hearing a few weeks later, appellant was adjudged mentally ñl and dangerous and was committed to Saint Elizabeths Hospital for an indeterminate period. Appellant did not appeal from these rulings.
Ten years later, still under commitment to the hospital, appellant moved to withdraw his stipulation and to vacate the NGI finding. The trial court denied appellant’s motion in a written order. From that denial he appeals; we affirm.
I
At trial in January 1986, defense counsel stipulated to the facts of the alleged offenses 1 and relied solely on a defense of insanity. Counsel introduced a report from appellant’s examining psychiatrist, Dr. Howell J. Howard, stating that appellant “at the time of the alleged offense[s] ... as a result of a mental disease or defect did lack substantial capacity to recognize the wrongfulness of his conduct or to conform his conduct to the requirements of the law....” The court then addressed appellant directly:
The Court: All right. Mr. Malone?
The Defendant: Yes.
The Court: You’ve been listening to what’s going on here, haven’t you?
The Defendant: Yes.
The Court: What does this all mean to you?
The Defendant: I’m guilty of the fact that I did go into the bank with intentions of taking of value more than two hundred dollars, and I did break the window and I did — was informed that a medical report would be done on me and it was. I was listening to him and I am — I think I’m capable [of] standing trial.
The Court: All right. Do you know that you don’t have to do it this way? Do you know that you can to go to trial in front of a jury with a full jury and a judge, and all the witnesses would come in, and it wouldn’t be done this way. You know you have a right to do it that way, don’t you?
The Defendant: Yes, sir. I realize it, but I’d rather not.
The Court: You’d rather do it this way?
The Defendant: Yes, sir.
The Court: You’ve talked with your lawyer about that?
The Defendant: Yes.
The Court: And you understand what he’s explained to you?
The Defendant: Yes, sir, I understand a jury trial.
The Court: Okay. Do you understand this business about the doctor?
*891The Defendant: Yes.
The Court: If the doctor were here, he’d say in effect, yep, Mr. Malone committed — he did things. But when he did those things, he wasn’t really being a criminal. He knew he was doing the wrong thing, but he didn’t really have an appreciation of how wrong it was. Do you understand that?
The Defendant: Yes, sir. That’s me.
The Court: That’s you?
The Defendant.- Yes, sir.
The Court: What do you think you can do about getting out of this hole, huh?
The Defendant.- I’m a leave it up to you, sir.
After this exchange, the court found appellant competent to participate in the proceedings and to select a defense. The court then found him not guilty by reason of insanity of the charged offenses.
After the announcement of the verdict, the following took place in open court:
The Court: ... Now what remains is the commitment to St. Elizabeths Hospital for a sixty-day period within which he has a right to have his situation, as I understand it, be examined to determine whether or not he continues to be dangerous to himself or others.
Mr. Mann [defense counsel]: That’s correct, Your Honor. We would ask that the court set a hearing [in] sixty days.
The Court: Okay.
Next, counsel and the court discussed a scheduling matter,and then the court addressed appellant as follows:
The Court: So you understand now, Mr. Malone, here you’re headed for?
The Defendant: St. Elizabeths for sixty days.
The Court: Right.
The Defendant: Is that in the jail?
The Court: I beg your pardon?
The Defendant: Is that in a jail, sir?
The Court: Well, it’ll be in the John Howard Pavilion, in all likelihood.
The Defendant: Yes, sir.
The Court: But it’s not down at D.C. Jail, no.
On March 11, 1986, the court held a Bolton hearing.2 At its conclusion, the court ruled that appellant was mentally ill and dangerous and ordered that he remain committed to Saint Elizabeth Hospital under D.C.Code § 24-301(d) (1996).
On January 18, 1996, almost ten years later, after several unsuccessful attempts to secure his release or transfer from Saint Elizabeth Hospital,3 appellant filed a motion requesting the trial court to allow him to withdraw his “plea of guilty by reason of insanity ... [u]nder Rule 32” and order his unconditional release pursuant to D.C.Code § 24-301(k). He argued that it was “manifest injustice” for him to have “entered an NGI plea without knowing that he could face a lifetime commitment at Saint Elizabeths .” Appellant asserted that he “did not understand from any source what the ramifications of his entering an NGI plea would/could be.” Moreover, relying on Legrand, v. United States, 570 A.2d 786 (D.C.1990), he contended that the court violated the requirements of Super.Ct.Crim.R. 114 by failing to provide *892him with “a detailed explanation of the consequences of an NGI plea.” Appellant’s motion was not accompanied by an affidavit, or anything else under oath, to support his claim.
The government opposed appellant’s motion and attached to its opposition an affidavit from appellant’s trial counsel,5 which stated in pertinent part:
9. I discussed with Mr. Malone the minimum and maximum penalties he could receive for second degree burglary and destruction of property, felony, if convicted. I also told him that upon the court accepting the stipulated plea of not guilty by reason of insanity, he would be sent to St. Elizabeths Hospital for further inpatient evaluation for an indeterminate period time. I explained further that the hospital would recommend release into the community in the future if they believed he would not pose a danger to self and/or others due to mental illness.
10. I believed that Mr. Malone understood the nature and consequences of his entering a plea of not guilty by reason of insanity and that it was Mr. Malone’s decision and wish to be committed to St. Elizabeths Hospital to seek psychiatric treatment.
In a written order, the court denied appellant’s motion without a hearing.6 The court’s order stated in part:
Even though the trial judge’s “Rule 11” inquiry may have been technically deficient, there is no prejudice and no manifest injustice shown by this record. The judge addressed defendant personally and determined on the record that his plea was knowing and voluntary. Although the judge did not elaborate on the maximum and minimum penalties defendant would face if found guilty, and did not explain in detail the indeterminate nature of the NGI commitment, it is clear from the record that defendant was properly advised and understood both concepts. Defendant freely admitted that he committed the acts constituting the crimes and acknowledged that he was mentally ill and not criminally responsible at the time. Defendant was found competent to enter his plea, and he does not challenge that finding. Defendant’s lawyer fully advised him as to his alternatives and the consequences of his plea, which more than made up for any deficiencies in the judge’s inquiry.... Finally, defendant has not shown, and cannot show, that he was prejudiced in the sense that his decision to enter an NGI plea would have been different even if the judge’s “Rule 11” inquiry had been letter-perfect.
II
District of Columbia law recognizes only three pleas in criminal cases: not guilty, guilty, and nolo contendere. Super.Ct.Crim.R. 11(a). Unlike some other jurisdictions,7 the District of Columbia does not accept “not guilty by reason of insanity” as a valid plea. Rather, the District of Columbia maintains the long-established distinction between permissible pleas and affirmative defenses such as insanity. See D.C.Code § 24 — 301(j) (1996) (setting forth the elements of, and the defendant’s burden of proof in asserting, the insanity defense); Wilkes v. United States, 631 A.2d 880, 882 n. 4 (D.C.1993) (same), cert. denied, 513 U.S. 848, 115 S.Ct. 143, 130 L.Ed.2d 84 (1994).
Appellant characterizes his 1986 stipulation as a guilty plea and styles his instant motion as one for post-sentence relief under Rule 32(e), which is headed *893“Withdrawal of plea of guilty.” He is mistaken in both respects. Although appellant admitted to all of the conduct on which the criminal charges against him were based, he did not plead guilty, see United States v. Brown, 138 U.S.App.D.C. 398, 400-401, 428 F.2d 1100, 1102-1103 (1970), and therefore Rule 32(e), which allows a court to set aside “a plea of guilty or of nolo contendere,” is not applicable. Moreover, an insanity acquittee committed to a mental hospital is not considered to be serving a “sentence.” See Morrison v. United States, 579 A.2d 686, 688 (D.C.1990) (holding that a motion to vacate sentence under D.C.Code § 23-110 is unavailable to an NGI defendant, citing O’Beirne v. Overholser, 109 U.S.App.D.C. 279, 282, 287 F.2d 133, 136 (1960)).
D.C.Code § 24-301(k)(l), on the other hand, provides in part:
A person in custody [in a mental hospital] ... pursuant to provisions of this section, claiming the right to be released from custody, the right to any change in the conditions of his release, or other relief concerning his custody, may move the court having jurisdiction to order his release, to release him from custody, to change the conditions of his release, or to grant other relief.
Thus section 24-301(k)(l) is the proper vehicle by which appellant may challenge his stipulation and the ensuing NGI judgment. Morrison, supra, 579 A.2d at 688 (“The language of the statute is sufficiently broad, referring to ‘other relief ”).
An insanity acquittee who stipulated to the acts underlying the charges against him and later, in a collateral proceeding, seeks to withdraw that stipulation stands in a position somewhat comparable to that of a criminal defendant who seeks to withdraw a guilty plea after having been sentenced. United States v. Brown, supra, 138 U.S.App.D.C. at 400-401, 428 F.2d at 1102-1103. Hence this court has held that in order to prevail in such a proceeding, the insanity acquittee must demonstrate that the process leading to the stipulation was so defective that it resulted in manifest injustice. Walls v. United States, 601 A.2d 54, 57 (D.C.1991); Morrison, 579 A.2d at 689-690; Legrand, 570 A.2d at 792; see also Hill v. United States, 368 U.S. 424, 428, 82 S.Ct. 468, 7 L.Ed.2d 417 (1962) (to prevail in a collateral attack, appellant must demonstrate “a fundamental defect which inherently results in a complete miscarriage of justice”).
Appellant argues that his commitment to Saint Elizabeths was the product of “manifest injustice” because the trial court, in violation of Rule 11, accepted his stipulation without advising him personally of the consequences that would result from it. Rule 11(c) provides that “[b]efore accepting a plea of guilty or nolo contendere, the Court must address the defendant personally in open court and inform the defendant of, and determine that the defendant understands ... the maximum penalty provided by law....” But because appellant entered a plea of not guilty, Rule 11 does not apply. United States v. Brown, supra, 138 U.S.App.D.C. at 401, 428 F.2d at 1103 (discussing Fed.R.Crim.P. 11, which is identical to Super.Ct.Crim.R. 11 in all relevant respects). Nevertheless, because concerns similar to those associated with a guilty plea are involved, we have held that when a defendant waives trial on all issues but his sanity, the principles of Rule 11 do apply to some extent. Le-grand, 570 A.2d at 792 (Rule 11 “does not apply directly to this case, but is instructive by analogy”); Glenn v. United States, 391 A.2d 772, 774 (D.C.1978) (citing Brown). In such cases, therefore, “the trial judge should address the defendant personally in determining whether the waiver is made voluntarily with understanding of the consequences of his act.” Brown, 138 U.S.App.D.C. at 401-402, 428 F.2d at 1103-1104 (emphasis added).8
*894Rule 11 specifically leaves room for a finding of harmless error. Section (h) of the rule, both the 1986 version and the current (1999) version, states: “Any variance from the procedures required by this rule which does not affect substantial rights shall be disregarded.”9 Therefore, any failure of the court to comply strictly with section (c) “shall be disregarded” upon a showing by the government that the failure did not affect the substantial rights of the defendant. Boyd v. United States, supra note 9, 708 A.2d at 823. In a case such as this one, when the court fails to inform the defendant about the potential length of his commitment to a mental hospital, substantial rights are affected only if the length of the commitment can reasonably be viewed as a material factor bearing on the defendant’s decision to stipulate to the acts charged and rely solely on the defense of insanity. See Morrison, 579 A.2d at 691; Legrand, 570 A.2d at 795; Gaston v. United States, 535 A.2d 893, 896 (D.C.1988).
In this case we are satisfied that the government has met its burden of showing harmlessness. “Rule 11 concerns can be met by statements made in open court in the presence of the accused ... or statements made to the accused by his counsel.” Morrison, 579 A.2d at 691 (citations omitted). Appellant was present when counsel and the court discussed the sixty-day commitment pending further evaluation. The court specifically asked appellant if he understood where he was going, and appellant responded, “St. Eliza-beths for sixty days.”10 Beyond that, the affidavit of appellant’s trial counsel, submitted by the government in opposition to appellant’s motion, demonstrates that appellant received “real notice” from counsel of the consequences of his stipulation. Henderson v. Morgan, 426 U.S. 637, 645, 96 S.Ct. 2253, 49 L.Ed.2d 108 (1976). Even if the court fails to explain fully the possible duration of the defendant’s confinement, such an explanation from counsel can suffice — and did suffice in this case11 —to meet the government’s burden under Rule 11(h). See id. at 646-647, 96 S.Ct. 2253.
Finally, in order to warrant withdrawal of the stipulation, appellant must at least allege (indeed, must prove) that he would not have proceeded as he did if he had been properly informed. See Holland v. United States, 584 A.2d 13, 16 (D.C. 1990). Neither appellant’s motion in the trial court nor appellant’s brief in this court contains any such allegation. In fact, considering appellant’s expressed desire at the time to remain in custody — “If they put me back into the streets ... I’ll have to do something else to get arrested” — it is unlikely that he would have chosen a different course if he had been more fully advised by the court.12
*895III
If the trial court committed any error at all in accepting the stipulation, it was harmless. The order denying appellant’s motion is therefore
Affirmed.
. Through the stipulation appellant admitted entering the American Security Bank at 215 Pennsylvania Avenue, S.E., for the purpose of taking money. He further stipulated that he gained entry by breaking the glass doors of the bank with a cinder block and that these doors had a replacement value greater than $200.
. Bolton v. Harris, 130 U.S.App.D.C. 1, 395 F.2d 642 (1968); see also D.C.Code § 24-301(d)(2) (1996).
. Between 1988 and 1996. appellant filed numerous pro se motions for release. Many of these motions were withdrawn by appellant before the court had a chance to rule on them. Motions in 1990, 1993, and 1995, claiming that appellant should be released because he was no longer dangerous, were heard and denied by three different judges. Appellant was represented by counsel at those hearings. None of the prior motions challenged the validity of appellant’s 1986 stipulation to the facts underlying the charges against him.
.References in this opinion to Rule 11 are to the 1986 version, which was in effect at the time of appellant’s stipulated trial.
. Appellant’s 1996 motion was filed on his behalf by newly appointed counsel, who continues to represent him on this appeal.
. Since the original judge who presided at the stipulated trial and imposed sentence had retired and was not available, the motion was decided by a different judge.
.See, e.g., Ala.Crim.R. 14.2(c); Me.Crim.R. 11(a)(1); Md.Crim.R. 4-242(a).
. In Legrand. this court held that "in an NGI case ... the judge must ... satisfy himself that the defendant meaningfully comprehends what may happen to him if he pleads not *894guilty by reason of insanity.” 570 A.2d at 793 (emphasis added). However, at the time of appellant’s stipulation in 1986, Brown, not Legrand, controlled. See Walls, supra, 601 A.2d at 57 n. 12 (Legrand does not apply to a pre-1990 stipulated trial); see also M.A.P. v. Ryan, 285 A.2d 310, 312 (D.C.1971).
. “Section (h) was added to Fed.R.Crim.P. 11 in 1983 in response to McCarthy v. United States, 394 U.S. 459, 89 S.Ct. 1166, 22 L.Ed.2d 418 (1969), a case which some courts had read as holding that all violations of Rule 11 were prejudicial per se." Boyd v. United States, 703 A.2d 818, 823 (D.C.1997) (footnote omitted).
. Appellant argues that this response showed only that he believed he was going to Saint Elizabeths for sixty days, not for an indeterminate period. This argument, however, ignores the fact that appellant's response immediately followed a discussion about his return to court for additional proceedings after further evaluation of his mental condition.
. The motions judge so ruled: "Defendant’s lawyer fully advised him as to his alternatives and the consequences of his plea, which more than made up for any deficiencies in the judge’s inquiry.”
. Dr. Howard’s report indicates that appellant committed the crime just so that he would be arrested and confined:
[Fjor him the most important fact of his criminal behavior is that [it] consistently *895relieves him from having to live an unstructured life in the streets with no money, job, shelter, or medicine, and gets him back in the structured shelter of the jail with food and medicine. He is totally oblivious to the concept of jail being a “penalty” for crime; and, in fact, views jail as the next best thing to being in the Salem V.A. Hospital. Mr. Malone actually stated during my examination, "If they put me back into the streets (as a result of these charges), I'll have to do something else to get arrested.” [Emphasis in original.]