
772 P.2d 559 (1989)
David T. BARRETT, Appellant,
v.
STATE of Alaska, Appellee.
No. A-2132.
Court of Appeals of Alaska.
April 14, 1989.
*560 Charlene A. Lichtmann, Anchorage, for appellant.
Cynthia M. Hora, Asst. Atty. Gen., Office of Sp. Prosecutions and Appeals, Anchorage, and Grace Berg Schaible, Atty. Gen., Juneau, for appellee.
Before BRYNER, C.J., and COATS and SINGLETON, JJ.

OPINION
SINGLETON, Judge.
David T. Barrett was found "guilty but mentally ill," AS 12.47.030, on a charge of escape in the second degree, a class B felony. AS 11.56.310(a)(1)(A). Barrett, a second felony offender, received an aggravated presumptive term of six years with two years suspended. See AS 12.55.125(d)(1) (prescribing a four-year presumptive term for a second felony offender convicted of a class B felony). He appeals his conviction and his sentence. We affirm *561 Barrett's conviction but remand for resentencing.
On February 7, 1984, Barrett was convicted of robbery in the first degree, a class A felony. AS 11.41.500. He was sentenced to ten years' imprisonment with five years suspended. After sentencing, Barrett was transferred to a federal penitentiary in Lompoc, California, where he served approximately three years. Barrett was returned to Alaska on March 3, 1986. He was temporarily held at the Cook Inlet Pretrial (CIP) facility in Anchorage. At CIP, Barrett went before a classification board, and was assigned to medium security at the Palmer Correctional Center (PCC). Barrett arrived at PCC on April 21, 1986.
On April 22, Barrett was given a routine intake interview by Dr. Patrick Molloy, a psychologist. Before this interview, Molloy had received a "red flag" report on Barrett's mental health. The report noted that Barrett had been hospitalized twelve years earlier for about thirty days because of mental health problems. During his exam, Molloy found Barrett oriented to time, place, and person. Molloy also found that Barrett was rational, that his memory and judgment were intact, and that Barrett was not suffering from a major mental illness. During the interview with Molloy, Barrett expressed an interest in carpentry. Molloy explained to Barrett that he could only work in carpentry if he were transferred to the minimum security side of PCC. According to Molloy, Barrett then expressed a definite desire to be transferred to minimum security.
However, Barrett testified that he wanted to remain in medium security at PCC. Barrett claims that he was confused as to how the work release program operated and did not understand that he had to go to minimum security before he could go to work release. Barrett testified that he expressed his confusion both to Molloy and to Tom Martin, his counselor. After the interview, Molloy requested that Barrett remain at the medium security facility for a thirty- to sixty-day period for observation.
On May 7, 1986, Barrett appeared before the reclassification board at PCC. Barrett testified that he did not speak during the classification hearing. He stated that he did not tell the board that he wished to remain in medium security because his counselor instructed him to "go along with whatever they say, we'll talk about it after." Barrett also said that he was confused as to the procedures; he believed he had time to discuss any possible transfer with his counselor before the transfer actually took place. Instead, Barrett was transferred to the minimum security side of PCC the day of his interview, at approximately 4:00 p.m. Barrett testified that he was placed in a housing area, but that the corrections officers never explained to him the rules of the facility. Barrett testified he was told, however, that inmates could sign out "for a nature walk or whatever." Barrett signed out at 5:30 p.m. that day.
Corrections Officer Samuel Park first discovered that Barrett was missing at approximately 6:15 p.m. Park's shift began at 6:00 p.m. His shift had been asked to keep an eye on Barrett because he was a new transfer. Park explained that inmates are allowed in the minimum security yard if they sign out on a yard register. The minimum security yard is boundaried by two parking lots, an administration building, and a tree line. When the escape was verified, the Alaska State Troopers were notified. Parks testified that troopers were on the scene within an hour.
Barrett was eventually found by Trooper Don Savage. Savage testified that he was notified of the escape when he came on duty at 12:00 a.m. on May 8. Savage had received information that Barrett was familiar with the Glennallen area, so he concentrated his patrol in that area. Savage testified that he first saw Barrett at 7:40 a.m. near Mile 82 of the Glenn Highway. Savage testified that Barrett turned, saw his patrol car, and then ran into the woods. At 1:15 p.m., Savage again spotted Barrett, this time near Mile 83. According to Savage, Barrett again moved from the roadway. Savage stopped his car and saw Barrett lying on the ground behind a tree. Savage took Barrett into custody. A search of Barrett revealed some personal *562 papers and a toothbrush. He was taken to the Mat-Su pretrial facility. Savage testified that during the ride Barrett said "he had his reasons" for leaving. According to Savage, Barrett also said he could not believe how much money the state was spending looking for him. Savage testified that Barrett told him that he had counted $50 every time a helicopter flew over, and that he wondered why the police did not pick him up in Glennallen.
In defense, Barrett claimed he had no intent to leave the PCC facility. Barrett testified that he did not remember leaving PCC. His first memory was being thirsty, and having a "sort of surreal sensation going through my body." He stated that he did not know what direction he was headed, and that it did not originally occur to him that he might be outside the facility's perimeters. He said that he was just walking, and that he felt scared. Barrett testified that he first realized that he had gone too far from PCC when he found himself in the middle of a farmer's field, in mud up to his knees. Barrett further testified that while he was walking through the woods, he noticed that helicopters were flying over him and he imagined that they might be looking for him. However, Barrett did not attempt to flag down one of the helicopters. He testified that he feared that, because there was no place for a helicopter to land in the woods, those inside the helicopter would simply shoot him. Therefore, Barrett decided to go back to the road. When Barrett reached the road, however, he was frightened by the trucks and cars. Therefore, he ran off the road whenever an automobile approached. Barrett stated that he hid when Trooper Savage stopped "because I didn't know what sort of person would be out there on the highway." Barrett further stated, "Until I was certain that there was a ... police officer who was up on the road I wasn't going to expose myself." Barrett also testified that he did not know why he made the statements in Trooper Savage's car.
Barrett's testimony as to his psychological state was corroborated in part by Dr. Gregory McCarthy, a psychiatrist, who testified on Barrett's behalf at trial. The state did not present a rebuttal psychiatrist. McCarthy examined Barrett on April 1, 1987. Prior to this examination, he reviewed previous reports from three psychiatrists who had interviewed Barrett after Barrett's escape from PCC. According to McCarthy, two of these reports diagnosed Barrett as suffering from a "[s]chizoid personality disorder with some traits of paranoia." The third psychiatrist did not make a diagnosis. However, McCarthy conceded that these diagnoses did not affect Barrett's ability to formulate an intent to leave PCC.
McCarthy diagnosed Barrett as having a "depersonalization disorder," which might have been relevant to Barrett's ability to form an intent to escape. McCarthy described a depersonalization disorder as:
[A]n alteration in the perception or the experience of the self so that the usual sense of one's reality is more or less temporarily lost or changed... . [B]asically there is this sense of one's reality being lost or different. You can have a sense of self-estrangement, unreality, a sense of doing things and ... in some respects you're aware you're doing them but yet you're not doing them.
McCarthy noted Barrett's symptoms included a feeling that his "feet were walking on [their] own," and a sense of "feeling drugged." McCarthy concluded that Barrett could have been having a depersonalization episode the day he escaped, and that Barrett could have left PCC "without necessarily intending to do so" and "without being aware of doing so."
On cross-examination, McCarthy acknowledged that he was unaware of the statements that Barrett made to Trooper Savage. McCarthy further acknowledged that the police reports would have helped him in his diagnosis. McCarthy also noted on cross-examination that he was unsure how long Barrett's depersonalization period lasted. He testified that it was possible that from the time Barrett found himself in the mud on the farm he was no longer in a depersonalization episode and was aware of what he was doing. McCarthy further admitted *563 that while Barrett may not have had a specific intent to leave or escape, in the sense of having premeditated or preplanned an escape, he may have knowingly left the facility. McCarthy explained that while Barrett may not have been aware of the fact that he was moving, he would have been aware of his location at any particular time.
The state also presented testimony from J.M., a fellow inmate of Barrett's in the medium security unit at PCC. J.M. testified that he noticed Barrett some time before the day of Barrett's escape because Barrett was constantly watching the fence. J.M. testified that Barrett once told him of his plan to escape from the medium security facility. According to J.M., Barrett also questioned him as to whether he had been at the minimum security side of PCC. J.M. said that he had. J.M. testified that Barrett then inquired whether it would be difficult to escape from minimum security. J.M. told Barrett that it would not be difficult and that an inmate could just walk away. J.M. then testified that Barrett claimed that he would escape from PCC and live in the woods because he knew the Palmer area well. Barrett denied ever having such conversations with J.M.

DISCUSSION
In this case we are asked to evaluate the interplay between AS 12.47.020(a) (dealing with the relevance of mental disease or defect to the mens rea required for conviction of an offense) and AS 12.47.030 (dealing with the category of individuals who are guilty but mentally ill). Before addressing the parties' arguments, a brief introduction is in order. Under both the state and federal constitutions, the state has the burden of proving each element of an offense beyond a reasonable doubt before a jury may properly return a verdict of guilty. Patterson v. New York, 432 U.S. 197, 97 S.Ct. 2319, 53 L.Ed.2d 281 (1977). The state's burden of proof includes proving the requisite mens rea. Mullaney v. Wilbur, 421 U.S. 684, 95 S.Ct. 1881, 44 L.Ed.2d 508 (1975). See generally 1 W. LaFave and A. Scott, Substantive Criminal Law §§ 1.8, 3.8 (1986) (discussing burden of proof in criminal cases and constitutionality of strict liability offenses). The insanity defense is generally viewed as separate and distinct from asserting the state's inability to prove mens rea. LeLand v. Oregon, 343 U.S. 790, 795, 72 S.Ct. 1002, 1005, 96 L.Ed. 1302 (1952); State v. Patterson, 740 P.2d 944, 945 (Alaska 1987); Hart v. State, 702 P.2d 651, 656, 659 n. 10 (Alaska App. 1985). See 1 W. LaFave and A. Scott, Substantive Criminal Law § 4.7 at 520-23 (1986) (partial responsibility). In Hart, we compared AS 12.47.010 (insanity excluding responsibility) to AS 12.47.030 and concluded:
In summary, if we assume that three distinct classes of individuals are exempted from criminal responsibility under the A.L.I. test [former AS 12.45.083]  first, those who were unable as a result of mental disease or defect to appreciate the nature and quality of their conduct; second, those who by virtue of mental disease or defect were unable to appreciate that their acts were wrong; and third, those who knew what they were doing and knew that it was wrong, but nevertheless were irresistibly impelled to perform the act  only the first is now expressly exempt from criminal responsibility under Alaska law. The latter two categories are guilty but mentally ill.
702 P.2d at 657-58 (footnote omitted).[1] We are now able to evaluate Barrett's arguments.
*564 Barrett first argues that the trial court erred in presenting his defense to the jury. Specifically, Barrett contends that the trial court erred in failing to properly instruct the jury under AS 12.47.020. Alaska Statute 12.47.020 provides, in relevant part:

Mental disease or defect negating culpable mental state. (a) Evidence that the defendant suffered from a mental disease or defect is admissible whenever it is relevant to prove that the defendant did or did not have a culpable mental state which is an element of the crime... .
(b) When the trier of fact finds that all other elements of the crime have been proved but, as a result of mental disease or defect, there is a reasonable doubt as to the existence of a culpable mental state that is an element of the crime, it shall enter a verdict of not guilty by reason of insanity... .
In order to understand Barrett's arguments regarding this section of the statute, it is first necessary to construe the statute. We did not separately interpret this section in Patterson or Hart.
Alaska Statute 12.47.020 is very similar to AS 11.81.630, which deals with the significance of evidence of intoxication.[2] However, AS 12.47.020 should be distinguished from AS 12.47.010, which deals with the affirmative defense of insanity.[3] While AS 12.47.010 establishes an affirmative defense, neither AS 12.47.020 nor AS 11.81.630 establishes an affirmative defense. The presence of mental disease or defect under AS 12.47.020, like the presence of intoxication under AS 11.81.630, is not a defense, and its absence is not an element of the state's case. For purposes of AS 12.47.020, mental disease or defect is therefore not independently significant in a criminal prosecution. The significance of mental disease or defect, like the significance of intoxication, depends on its relation to the mens rea requirement for the particular criminal offense under consideration.
Barrett was charged with a violation of AS 11.56.310 which provides, in relevant part:

Escape in the second degree. (a) One commits the crime of escape in the second degree if, without lawful authority, one
(1) removes oneself from
(A) a correctional facility while under official detention.
The parties are in agreement that it was necessary for the state to prove the following beyond a reasonable doubt in order to convict Barrett of this offense: (1) that the event in question occurred at or near Palmer, Alaska, and on or about May 7, 1986; (2) that David Barrett knowingly removed himself from a correctional facility; and (3) that at the time of the removal he was under official detention. In his opening statement, defense counsel conceded that the first and third elements had been established and that the sole issue in the case was whether Barrett knowingly removed himself from a correctional facility.
Consequently, the trial court could have adequately conveyed the significance of AS 12.47.020(a) by instructing the jury that the state had the burden of proving that Barrett knowingly removed himself from the correctional facility. The instruction would have been completed by an additional instruction that, in determining whether he acted knowingly, the jury should consider *565 all of the evidence in the case, including any evidence of mental illness which Barrett may have been suffering at the time he acted.[4] Nothing further is required to instruct the jury properly on the interplay between evidence of mental illness and the culpable mental state which must be found in order to convict a person of a crime.
Nevertheless, AS 12.47.020(b) does require further action by a jury in a case in which evidence of mental disease or defect is offered on the issue of culpable mental state. If such evidence is offered, and after considering all of the evidence the jury has a reasonable doubt regarding whether the defendant acted with the requisite mental state in committing the offense, then the jury must go on to determine whether the defendant is not guilty or not guilty by reason of insanity. This determination is made by deciding whether the reasonable doubt as to the existence of a culpable mental state is due to a mental disease or defect. If it is, then the defendant is not guilty by reason of insanity. If it is not, then the defendant is simply not guilty. The parties are in disagreement as to precisely what these determinations require of the jury. The parties also disagree over the order in which the jury must make its determinations.
After carefully considering the statutes, we are satisfied that a jury should be instructed that it must make its determinations in the following manner. First, the jury must consider all of the evidence, including evidence of mental disease or defect. Second, the jury must determine whether a reasonable doubt exists regarding the mens rea required for the offense. If after considering all of the evidence the jury is satisfied beyond a reasonable doubt that the defendant acted with the appropriate mens rea, then it is unnecessary for the jury to consider AS 12.47.020(b) further. However, if after considering all of the evidence the jury has a reasonable doubt regarding the defendant's mens rea, the jury's third step is to consider whether it is satisfied by a preponderance of the evidence that the defendant has a mental disease or defect. If the jury is not satisfied that the defendant has a mental disease or defect, then the jury must find the defendant not guilty. If the jury does find that the defendant has a mental disease or defect, then the jury's final step is to determine whether the mental disease or defect was a substantial factor in preventing the defendant from acting with the requisite mental state. If the jury answers this final question affirmatively, then it must find that the defendant is not guilty by reason of insanity. If the jury does not find a causative mental disease or defect and therefore answers this final question negatively, then the jury must find that the defendant is simply not guilty.
We recognize that a defendant found not guilty by reason of insanity is under burdens that do not attach to a defendant simply found not guilty. However, we believe that the introduction of evidence of mental illness will not necessarily turn every not guilty verdict into a not guilty by reason of insanity verdict. We note that, even if the defendant is found not guilty, the state is always free to seek civil commitment when the not guilty verdict may be based in part upon evidence of mental disease or defect, and that mental disease or defect presents a danger to the defendant or others. See AS 12.47.080;[5] AS *566 47.30.700.[6] Thus, it seems fair that before the defendant is subjected to the burdens associated with being found not guilty by reason of insanity, without a separate commitment hearing and without the safeguards of AS 47.30.700, the jury must expressly find that the defendant has a mental disease or defect, and that that mental disease or defect caused the defendant to lack the requisite mental state for a conviction. The plain language of AS 12.47.020(b) requires such a causal nexus to be established ("as a result of mental disease or defect, there is a reasonable doubt as to the existence of a culpable mental state that is an element of the crime").
It is important to stress that a jury does not necessarily make factual findings concerning mental disease or defect whenever it acquits. In general, it is simply the inability to find that the defendant is guilty beyond a reasonable doubt which explains a not guilty verdict. Our conclusion that the mental disease or defect need only be a substantial factor in causing the lack of the requisite mens rea in order to substitute a not guilty by reason of insanity verdict for a not guilty verdict is consistent with the general treatment of causation in this jurisdiction.[7]See State v. Abbott, 498 P.2d 712, 726-28 (Alaska 1972) (discussing "causation" in negligence law, particularly where more than one factor may be said to have caused an event).
Barrett's arguments regarding a proper interpretation of AS 12.47.020 are somewhat ambiguous. It is possible that he reads the statute in the same way we do. His reply brief, however, suggests an alternative reading. In this view, a jury would first be required to determine whether a defendant had knowingly engaged in prohibited conduct without regard to evidence of the defendant's mental illness. If, and only if, the jury finds beyond a reasonable doubt that the defendant had knowingly engaged in the prohibited conduct could the jury consider evidence of any mental illness and reconsider its determination of mens rea.
We reject this interpretation. First of all, as we noted above, a not guilty verdict does not necessarily represent any factual finding concerning mental disease or defect. *567 In returning a not guilty verdict, the jury is simply determining, based upon the totality of the evidence, that the state has failed to sustain its burden of proof beyond a reasonable doubt as to some element of the offense. In a case such as Barrett's, each individual juror might determine that the state has failed to prove knowing behavior for a number of separate reasons. One juror's reason might be based upon a determination that the defendant has a mental disease or defect. Another juror might conclude that the defendant wandered off the premises by accident, in reasonable ignorance of its boundaries. If we require the jurors to compartmentalize their determinations, we run the risk that the jury will agree that there is a reasonable doubt regarding mens rea, but disagree about the reasons for the lack of mens rea. The result would be that, despite a unanimous jury agreement that the state had failed to prove its case beyond a reasonable doubt, the jury would nevertheless fail to return a verdict. To avoid a hung jury in such a case, we require the jury to first consider all of the evidence in totality, including evidence of the defendant's mental state. If the jury concludes that the state failed to meet its burden of proof and that an acquittal is in order, only then should the jury decide if the acquittal should be based on a finding of mental disease or defect.
Having interpreted AS 12.47.020, we are now prepared to consider Barrett's objections. At the outset, it is important to recognize that Barrett did not object to the trial court's treatment of AS 12.47.020 in Instruction No. 16 at trial.[8] In fact, Barrett's only objections went to an issue that we will discuss hereafter, the propriety of instructing the jury on a verdict of guilty but mentally ill, pursuant to AS 12.47.030, where a defendant relies on AS 12.47.020 as a basis for challenging the mens rea for the offense with which he is charged.
On appeal, Barrett argues for the first time that the jury was not unequivocally instructed that the prosecution must prove every element of escape, including mens rea, before the jury first could consider evidence of mental illness. Barrett relies on Patterson v. State, 708 P.2d 712 (Alaska App. 1985), rev'd on other grounds, 740 P.2d 944 (Alaska 1987). Patterson, however, considered the affirmative defense of insanity under AS 12.47.010. In contrast, AS 12.47.020(a) simply addresses the admissibility of evidence of mental disease or defect where it is relevant to an issue of mens rea. As we discussed above, it does not make sense to have the jury, in a case like Barrett's, separately consider mens rea twice: first without consideration of the defendant's mental illness and then again with consideration of the defendant's mental illness. Contrary to Barrett's argument, *568 Jury Instruction No. 16, when read together with Instruction No. 15, clearly establishes the state's burden of proving each of the elements of the offense, including mens rea, beyond a reasonable doubt.[9]
Barrett next argues that the trial court erred in giving paragraphs three and four of Instruction No. 16. Paragraphs three and four provided:
The first issue is whether the defendant suffered from a mental disease or defect. If you find that the defendant suffered from a mental disease or defect, you must then determine if because of that mental disease or defect there is a reasonable doubt as to whether or not the defendant knowingly removed himself from the correctional facility. If you have a reasonable doubt, you must find him "not guilty by reason of insanity."
If you find that the state has proved all the elements of the crime beyond a reasonable doubt including the required mental state, you must find the defendant "guilty" regardless of whether or not he suffered from a mental disease or defect.
Barrett contends that this instruction virtually eliminated a diminished capacity defense for him. At the outset it is important to realize that Barrett, through counsel, literally dictated almost all of the language in question to the trial court, and that the trial court, without objection from the state, accepted the dictated language. There are errors in this instruction. Before discussing these errors, we again emphasize that the proper procedure is for the jury to consider the totality of the evidence, including any evidence of mental illness, in determining if the state has proved beyond a reasonable doubt that the defendant knowingly removed himself from a correctional facility. If the jury has a reasonable doubt, it must find the defendant "not guilty." If the jury goes on to find by a preponderance of the evidence that the mental disease or defect was a substantial factor in causing a relevant lack of mens rea, the verdict should be changed to not guilty by reason of insanity.
The first error in Instruction No. 16 is that it implies that the jury may not consider mental disease or defect in evaluating the defendant's knowledge unless it finds by a preponderance of the evidence that a mental disease or defect exists. Second, the instruction suggests that the jury should consider the interplay between mental disease or defect and the defendant's knowledge in a vacuum, without reference to other evidence bearing on the issue. Third, the instruction implies that a verdict of not guilty by reason of insanity is required any time the jury considers evidence of mental disease or defect and decides that there is a reasonable doubt as to whether the defendant possessed the requisite knowledge. Fourth, the instruction rules out the possibility that the jury might find a mental disease or defect, conclude that the disease or defect did not cause lack of knowledge, but nevertheless find a reasonable doubt regarding Barrett's knowledge based on other evidence in the case. Because Barrett, in effect, dictated the language complained about, we must determine whether any of these errors, viewed individually or collectively, constitute plain error. Alaska R.Crim.P. 47(b).[10]
*569 We are satisfied that the instruction was not plain error in this case. Instruction No. 16 required the jury to find a mental disease or defect in order for it to find that the defendant lacked the requisite knowledge. The jury should have been instructed that it could consider any evidence of a mental disease or defect in determining whether a reasonable doubt existed regarding the defendant's knowing conduct, but that it did not have to find such a disease or defect in order to find that the state had not proved the "knowingly" element. Nevertheless, the jury found that a relevant mental disease or defect existed because it found Barrett guilty but mentally ill. Further, it was clearly the defense theory of the case that a relevant mental disease or defect was established by the uncontradicted testimony of Dr. McCarthy. Therefore, under the circumstances, an instruction requiring the jury to find a mental disease or defect as a matter of fact before considering its relevance to a finding of mens rea did not substantially prejudice Barrett and was not a plain error.
We realize that it is possible that the jury saw the evidence in this way: (1) We found by a preponderance of the evidence that Barrett had a mental disease or defect, "A"; (2) we also find that Barrett may have had complementary mental diseases or defects, "B" and "C"; (3) however, we do not find "B" and "C" by a preponderance of the evidence; (4) we are satisfied that "A" did not deprive Barrett of the requisite mens rea, but did prevent him from conforming his conduct to the requirements of the law  this explains our guilty but mentally ill verdict; (5) nevertheless, had we considered mental diseases and defects "A," "B," and "C" together with all the other evidence, even though we could not find "B" and "C" by a preponderance of the evidence, we might have had a reasonable doubt about Barrett's formulating the requisite culpable mental state. While possible, this hypothetical jury conclusion is not sufficiently likely to establish plain error.
We are also satisfied that focusing the jury's attention exclusively on mental disease or defect while the jury was determining whether there was a reasonable doubt that Barrett acted knowingly in leaving the correctional facility was not plain error. The jury was instructed that escape is a continuing offense and that if, at any time, Barrett knew that he was outside the correctional facility, he had a duty to exercise reasonable care to return. See Wells v. State, 687 P.2d 346, 350 (Alaska App. 1984) (escape is a continuing offense). Instruction No. 18 provided:
If you find that the State has proven each and every element of the offense beyond a reasonable doubt except the culpable mental state and the defendant later acquired the culpable mental state while in immediate flight from the correctional facility and made no reasonable effort to terminate his escape then you must find the defendant "guilty" or "guilty but mentally ill" regardless of his mental state at the time he left the facility.
Barrett does not complain of this instruction on appeal. If Barrett had been found in close proximity to PCC or if he had been found a short time after leaving PCC, it would have been theoretically possible that Barrett left the correctional facility without being mentally ill and without knowing that he was leaving the facility. However, such a finding does not appear possible on this record. Barrett was gone almost twenty hours and had covered over twenty miles in his flight from the institution. Thus, Barrett's defense attorney could reasonably have concluded that offering evidence of a mental disease or defect would *570 provide the only basis for a jury to find a reasonable doubt that Barrett knew he was leaving the facility and knew that he was remaining away from the facility. For the same reason, defense counsel might have reasoned that any reasonable doubt about mens rea would necessarily have been based upon a conclusion that Barrett was mentally ill. If defense counsel was correct, the result would necessarily be a not guilty by reason of insanity verdict rather than a simple not guilty verdict. These determinations would provide a tactical explanation for why defense counsel would request the language in Instruction No. 16 which Barrett objects to on appeal. We therefore find no plain error.
Barrett next challenges that part of Instruction No. 16 which informs the jury about AS 12.47.030 (guilty but mentally ill). Barrett makes two arguments. First, Barrett contends that the instruction is confusing to the jury and encourages compromise verdicts. We are satisfied that the trial court properly instructed the jury on the guilty but mentally ill verdict. We believe that such an instruction is appropriate in any case in which a defendant seeks a verdict of not guilty by reason of insanity under either AS 12.47.010 or AS 12.47.020. We stress that the jury must reject both a not guilty verdict and a not guilty by reason of insanity verdict under AS 12.47.010 before it can legitimately return a guilty verdict. Further, it is only where the jury has properly found the defendant guilty, after rejecting defenses predicated on AS 12.47.010, AS 12.47.020, or both, that it can consider a verdict of "guilty but mentally ill" in the absence of a separate competency hearing under AS 12.47.060. We agree with the Seventh Circuit that there is no greater risk of jury compromise in this situation than there is when a jury is instructed on a lesser-included offense. United States ex rel. Weismiller v. Lane, 815 F.2d 1106, 1112-13 (7th Cir.1987). We are satisfied that with proper instructions a jury should be able to distinguish between differing mental states and burdens of proof regarding these various statutes. In Barrett's case, the instructions did not constitute plain error.
Second, Barrett contends that once the jury was instructed under AS 12.47.030, he was entitled to an instruction under AS 12.47.010 (insanity excluding responsibility). In his arguments to the trial court, Barrett conceded that there was no evidence supporting an instruction under AS 12.47.010. Nevertheless, Barrett believes that such an instruction was necessary in order to put all the statutes before the jury. We are satisfied that the trial court did not err in declining to instruct on AS 12.47.010. In order to convict Barrett of escape, the state was required to prove, inter alia, that Barrett knowingly removed himself from a correctional facility. The term "knowingly" was defined for the jury as follows:
A person acts "knowingly" with respect to conduct or to a circumstance described by the law when he is aware that his conduct is of that nature or that the circumstance exists. When knowledge of the existence of a particular fact must be proved by the state, that knowledge is established if a person is aware of a substantial probability of the existence of the fact, unless he actually believes that it does not exist. A person who is unaware of conduct or a circumstance of which he would have been aware had he not been intoxicated acts knowingly with respect to that conduct or circumstance.
In contrast, a person defending under AS 12.47.010 has the burden of proving by a preponderance of the evidence that when the defendant engaged in the criminal conduct, the defendant was unable to appreciate the nature and quality of that conduct as a result of a mental disease or defect. We note that, without objection, the jury was instructed regarding the operative terms of this defense. Instruction No. 19 read:[11]
To "appreciate" the nature and quality of an act means to understand or comprehend *571 the act. A person is "unable to appreciate the nature and quality of his conduct" for purposes of the insanity defense if, because of mental disease or defect, he did not understand that he was performing the acts which are part of the crime with which he is charged.
It would appear, therefore, that in order for the jury to be convinced beyond a reasonable doubt that Barrett knowingly engaged in prohibited conduct despite any mental disease or defect, the state would necessarily have had to disprove the affirmative defense under AS 12.47.010. This is so because "knowing" that you are engaging in conduct is apparently the same as understanding or appreciating the nature of that conduct.[12]
In summary, once Barrett brought his mental capacity into issue, AS 12.47.030 (the guilty but mentally ill statute) was operative whether Barrett was proceeding under traditional insanity (AS 12.47.010) or diminished capacity (AS 12.47.020). Thus, once Barrett was found guilty, the jury could move on to consider his guilt in light of the guilty but mentally ill option presented by the instructions. Barrett does not argue that the jury was improperly instructed on the procedure to be followed in determining whether a person, found guilty, is guilty but mentally ill. We express no opinion on that issue.
Barrett next interposes a number of objections to his being found guilty but mentally ill. In order to evaluate Barrett's contentions, it is helpful to compare a person found not guilty by reason of insanity under AS 12.47.010 (thus invoking the provisions of AS 12.47.090)[13] to a person *572 found guilty but mentally ill under AS 12.47.030 (thus invoking the provisions of AS 12.47.050).[14] When we compare these two provisions, it becomes clear that a person found not guilty by reason of insanity and a person found guilty but mentally ill are treated substantially the same. Both must initially be found by a preponderance of the evidence to have a mental illness which causally relates to the person's responsibility for criminal activity. Otherwise, under each, the defendant will simply be found "guilty" or "not guilty." Once this finding is made, each person is subjected to mental health treatment calculated to cure the mental illness or defect or to render the defendant less dangerous to the public. Neither person may be released absent a finding that either the mental illness has been cured or that, despite the mental illness, *573 the defendant is no longer dangerous. In each case, the duration of the treatment is limited by a sentence appropriate for the criminal conduct in which the defendant has engaged. In the case of someone found guilty but mentally ill, the duration of treatment is bounded by an appropriate sentence for the crime in question. In the case of a person found not guilty by reason of insanity, the duration of treatment is limited by a period not to exceed an appropriate sentence for the criminal conduct involved. In either case, the defendant may not be subjected to compulsory mental health treatment beyond the limits of an appropriate criminal sentence unless the state successfully obtains civil commitment.
Having looked at the statutes establishing procedures for treatment of a person found guilty but mentally ill, and having compared those procedures with similar procedures established for commitment of a person found not guilty by reason of insanity, we are now in a position to evaluate Barrett's arguments.[15] First, Barrett argues that incarceration of a person found guilty but mentally ill violates the due process clauses of the Alaska and United States Constitutions. Barrett has apparently misinterpreted the guilty but mentally ill statute. He seems to be arguing that a person found guilty but mentally ill can be incarcerated beyond his criminal sentence. He relies upon AS 12.47.050(b). In fact, detention of such a person beyond the expiration of his criminal sentence requires civil commitment. AS 12.47.050(e). Therefore, there is no due process violation.
Barrett next argues that imprisoning him violates the cruel and unusual punishment clauses of the Alaska and United States Constitutions. According to Barrett, he is in effect being punished for his illness, not his conduct. See Robinson v. California, 370 U.S. 660, 82 S.Ct. 1417, 8 L.Ed.2d 758 (1962). Barrett is in error. As we have seen, mental illness has no independent significance in Alaska criminal law. The significance of mental illness is dependent upon a nexus between the mental illness and the criminal activity or conduct charged. Barrett is being punished because of his conduct, not his illness, and because his conduct presents a risk to the public. As the supreme court noted in a slightly different context, a verdict of not guilty by reason of insanity contains within it the finding that the defendant committed the criminal act charged beyond a reasonable doubt. State v. Alto, 589 P.2d 402, 404 (Alaska 1979). The same is true in a finding of guilty but mentally ill. Under the circumstances, there is no imposition of cruel and unusual punishment. See Powell v. Texas, 392 U.S. 514, 88 S.Ct. 2145, 20 L.Ed.2d 1254 (1968).
Barrett next argues that the provision in AS 12.47.050 which denies him the opportunity for furloughs or releases on parole so long as he is mentally ill and a danger to the public, violates his right to equal protection of the laws. Barrett is in error. As we have seen, those found guilty but mentally ill are essentially treated in the same way as those who are found not guilty by reason of insanity. In evaluating legal restrictions on the latter under former law, the supreme court has found no violation of the equal protection of the laws. Alto, 589 P.2d at 405-08.
We believe that the same is true under current law. No responsible correctional official or parole board member would release a person into the community if he or she felt that that person was dangerous. See AS 33.16.100(a)(3) (discretionary parole limited to those who are not dangerous); AS 33.30.091,.101 (furloughs only available to those who present reasonable probability of living under reduced supervision without violating the law). See also Division of Corrections v. Neakok, 721 P.2d 1121, 1127 (Alaska 1986) (state is required to consider public safety in its administration *574 of parole system; by reasonable extension, state is required to consider public safety in its other functions of corrections, including furloughs and classifications). The procedures at issue here simply require that a responsible trier of fact make an express finding regarding a particular defendant's mental illness and danger before the defendant can be released into the community. As the supreme court noted in Alto, once the defendant interjects a plea of not guilty by reason of insanity, the defendant has in effect asserted a relationship between his or her alleged mental illness and the resulting criminal behavior. Alto, 589 P.2d at 405-06. Under Alto, that assertion justifies treating those found not guilty by reason of insanity differently from the community at large. We believe that the same result should apply to a defendant who offers evidence of a mental illness to negate a culpable mental state. Such a defendant has also asserted a relationship between his or her mental illness and the criminal behavior; therefore, the assertion justifies treating these defendants differently as well. See also Commonwealth v. Trill, 374 Pa.Super. 549, 543 A.2d 1106, 1121-24 (1988).[16]
Barrett next argues that the jury should have been instructed that unlawful evasion in the first degree is a lesser-included offense to escape in the second degree. At the time of Barrett's escape, a person committed unlawful evasion if "the person fails to return to official detention on a charge of a felony following temporary leave granted for a specific purpose or limited period, including privileges granted under AS 33.30.150, 33.30.250, or 33.30.260." AS 11.56.340. Barrett argues that when he signed out of PCC, he was on "leave." Because "leave" is not defined in the statute, Barrett contends that this issue should have been left to the jury. Barrett also contends that a finding of guilt on the escape charge is inconsistent with acquittal under unlawful evasion. He relies on Maynard v. State, 652 P.2d 489 (Alaska App. 1982). We are satisfied that the trial court did not err. In this case, the meaning of the term "leave" was a question of law for the court. See AS 01.10.040. By signing out, Barrett was free to roam within the boundaries of the institution. We are satisfied that the trial court did not err in concluding that the term "leave," in context, presupposes authorization to leave the boundaries of the institution. Consequently, because there was no evidence that Barrett was authorized to depart the boundaries of the institution, the trial did not err in declining to instruct on unlawful evasion.
Barrett next argues that a sentence of six years with two years suspended was clearly erroneous. Barrett was convicted of escape in the second degree, AS 11.56.310(a)(1)(A), a class B felony. The maximum penalty is ten years. AS 12.55.125(d). Barrett was serving a prior sentence for robbery; therefore, he was a second felony offender and was subject to a presumptive sentence of four years. AS 12.55.125(d)(1). The state proposed one aggravating factor: that the prior felony conviction considered for presumptive sentencing was a more serious offense than the present one. AS 12.55.155(c)(7). The court accepted this factor as a matter of law.
Barrett proposed two mitigating factors. First, he argued his conduct was among the least serious conduct included in the definition of the offense. AS 12.55.155(d)(9). Second, Barrett argued that because of his mental illness, he "committed the offense under some degree of duress, coercion, threat, or compulsion insufficient to constitute a complete defense, but which significantly affected [his] conduct." AS 12.55.155(d)(3). The court found that neither of these mitigators existed "[b]ecause this wasn't the least serious, nor was he acting under duress."
The trial court did not make extensive findings of fact and conclusions *575 of law with regard to Barrett's alleged mitigating factors. However, there was substantial evidence in the record, such as Jerry Martin's testimony, and Barrett's remarks to the arresting officer, that would support the conclusion that Barrett planned this escape. Judge Carlson was of the view that Barrett had become institutionalized and feared being released to the public and that he consequently left the premises in order to extend his prison term. There is some support for this conclusion in Barrett's psychiatric evaluations. However, the jury's finding by a preponderance of the evidence that Barrett was guilty but mentally ill was binding on the trial court. See Robison v. State, 763 P.2d 1357, 1359-60 (Alaska App. 1988). Judge Carlson's decision not to mitigate may conflict with the jury's determination. See Hart v. State, 702 P.2d 651, 663-64 (Alaska App. 1985). Consequently, in the interest of justice, we must remand to allow the trial court to reconsider the applicability of AS 12.55.155(d)(3) in light of the jury's determination that Barrett was guilty but mentally ill.
As previously indicated, Barrett has one prior felony conviction in the state court for the robbery of an office dealing in foreign exchange. It appears that he had also previously been convicted of burglary, but received a suspended imposition of sentence which was subsequently set aside. Consequently, this conviction does not count as a prior felony. AS 12.55.085. The presentence report indicates that Barrett was also convicted in federal court for the robbery of the foreign exchange. The parties may have overlooked this conviction. Barrett has a number of other misdemeanor convictions, and has spent a significant period of time in prison. If the trial court on remand properly determines that AS 12.55.155(d)(3) is inapplicable to Barrett, then a suspended sentence of two years in addition to the four-year presumptive term would not be an excessive sentence.[17] The sentence would not be clearly mistaken. McClain v. State, 519 P.2d 811, 813-14 (Alaska 1974).
The judgment of the superior court is AFFIRMED. The sentence is VACATED and the case REMANDED for resentencing.
BRYNER, C.J., and COATS, J., concur.
BRYNER, Chief Judge, concurring.
I agree in large part with the conclusions reached in Judge Singleton's opinion. Specifically, in the context of this case, I would conclude that Jury Instruction No. 16 was not plain error, that it was not error for the trial court to instruct the jury on the verdict of "guilty but mentally ill" (GBMI) under AS 12.47.030, that Barrett's constitutional challenges to the GBMI provision lack merit, and that any error in failing to instruct on a verdict of not guilty by reason of insanity under AS 12.47.010 was harmless beyond a reasonable doubt. Likewise, I would agree with Judge Singleton that a lesser-included offense instruction on the crime of unlawful evasion was not warranted in this case. Finally, I agree that, when the jury returns a verdict of GBMI and thereby unanimously concludes, by a preponderance of the evidence, that the defendant's conduct was significantly influenced by a mental disease or defect, the superior court is bound by the jury's determination and cannot impose a sentence based on the independent factual determination that the defendant's conduct was not influenced by a mental disease or defect. For these reasons, I concur in the result reached by Judge Singleton.
I nevertheless feel compelled to add that I have serious reservations concerning the constitutionality of AS 12.47.020, which deals with the defense of diminished capacity. In my view, there is a substantial question whether the state may legitimately require the entry of any verdict other than the traditional verdict of not guilty in a case where the state is incapable  for whatever reason  of proving all of the elements *576 of an offense. I emphasize that I do not agree with Judge Singleton's opinion to the extent that it suggests that the jury may properly be required to return a verdict of not guilty by reason of insanity when the state is incapable of proving the defendant's culpable mental state due to evidence of a mental disease or defect. Resolution of this issue is unnecessary in the present case, because the jury's verdict clearly establishes that Barrett's mental disease or defect did not preclude him from acting knowingly.
COATS, Judge, concurring.
I concur in the result in this case for the reasons stated by Judge Bryner in the first paragraph of his concurring opinion.
NOTES
[1]  The Alaska Supreme Court's decision in Patterson may alter this analysis slightly. In Patterson v. State, 708 P.2d 712, 717 (Alaska App. 1985), we interpreted the language "was unable, as a result of mental disease or defect, to appreciate the nature and quality of [the criminal conduct]" in AS 12.47.010 to excuse both those who did not know what they were doing when they engaged in criminal conduct and also those who, because of mental disease or defect, were unaware of the likely consequences of their conduct. We based this holding on our review of the history of the insanity defense. The supreme court rejected this conclusion, holding, in effect, that only those who did not know what they were doing when they engaged in criminal conduct were excused by AS 12.47.010. Patterson, 740 P.2d at 947-49. It is possible, therefore, that AS 12.47.010 merges with AS 12.47.020 in cases such as this one in which the culpable mental state is acting "knowingly" or, by extension, intentionally causing a result.
[2]  AS 11.81.630 provides:

Voluntary intoxication is not a defense to a prosecution for an offense, but evidence that the defendant was intoxicated may be offered whenever it is relevant to negate an element of the offense that requires that the defendant intentionally cause a result.
[3]  AS 12.47.010 provides, in pertinent part:

Insanity excluding responsibility. (a) In a prosecution for a crime, it is an affirmative defense that when the defendant engaged in the criminal conduct, the defendant was unable, as a result of a mental disease or defect, to appreciate the nature and quality of that conduct.
[4]  In this regard, the jury was properly instructed that AS 11.81.900(a)(2) provides, in pertinent part:

A person acts "knowingly" with respect to conduct .. . described by a provision of law defining an offense when the person is aware that the conduct is of that nature ...; when knowledge of the existence of a particular fact is an element of an offense, that knowledge is established if a person is aware of a substantial probability of its existence, unless the person actually believes it does not exist... .
[5]  AS 12.47.080 provides:

Procedure upon verdict of not guilty. (a) If a defendant is found not guilty under AS 12.47.040(a)(2), [as opposed to not guilty by reason of insanity] the prosecuting attorney shall, within 24 hours, file a petition under AS 47.30.700 for a screening investigation to determine the need for treatment if the prosecuting attorney has good cause to believe that the defendant is suffering from a mental illness and as a result is gravely disabled or likely to cause serious harm to self or others.
(b) In this section, "mental illness" has the meaning given in AS 47.30.915(12).
[6]  AS 47.30.700 provides:

Initiation of involuntary commitment procedures.
(a) Upon petition of any adult, a judge shall immediately conduct a screening investigation or direct a local mental health professional employed by the department or by a local mental health program that receives money from the department under AS 47.30.520-47.30.620 or another mental health professional designated by the judge, to conduct a screening investigation of the person alleged to be mentally ill and, as a result of that condition, alleged to be gravely disabled or to present a likelihood of serious harm to self or others. Within 48 hours after the completion of the screening investigation, a judge may issue an ex parte order orally or in writing, stating that there is probable cause to believe the respondent is mentally ill and that condition causes the respondent to be gravely disabled or to present a likelihood of serious harm to self or others. The court shall provide findings on which the conclusion is based, appoint an attorney to represent the respondent, and may direct that a peace officer take the respondent into custody and deliver the respondent to the nearest appropriate facility for emergency examination or treatment. The ex parte order shall be provided to the respondent and made a part of the respondent's clinical record. The court shall confirm an oral order in writing within 24 hours after it is issued.
(b) The petition required in (a) of this section shall allege that the respondent is reasonably believed to present a likelihood of serious harm to self or others or is gravely disabled as a result of mental illness and shall specify the factual information on which that belief is based including the names and addresses of all persons known to the petitioner who have knowledge of those facts through personal observation.
[7]  It is important to stress that AS 12.47.020(a), which addresses the admissibility of evidence, and AS 12.47.020(b), which addresses fact findings and jury verdicts, are independent. It is quite conceivable that a defendant might introduce evidence of his mental state which would be relevant to a determination pursuant to AS 12.47.020(a), but which would not persuade the jury to find by a preponderance of the evidence that he lacked the requisite culpable mental state. In such a case, it would also be possible that the jury might find a lack of culpable mental state on some other basis. Thus, it is not at all inconsistent for evidence of mental illness to be admissible under AS 12.47.020(a), but for the result to be a finding of not guilty, rather than not guilty by reason of insanity under AS 12.47.020(b). See AS 12.47.040(a)(2), (3).
[8]  Instruction No. 16 provided, in relevant part:

Before you begin your consideration of the issues raised by the defendant's assertion of a mental disease or defect, you must be satisfied beyond a reasonable doubt that both elements one and three in Instruction 15 [see infra note 9] have been proved beyond a reasonable doubt. If you find from your consideration that either of those elements has not been proved beyond a reasonable doubt, then you must find the defendant "not guilty."
If, on the other hand, you find from your consideration of all the evidence that elements one and three have been proved beyond a reasonable doubt, then you must consider the issues raised by the defendant.
The first issue is whether the defendant suffered from a mental disease or defect. If you find that the defendant suffered from a mental disease or defect, you must then determine if because of that mental disease or defect there is a reasonable doubt as to whether or not the defendant knowingly removed himself from the correctional facility. If you have a reasonable doubt, you must find him "not guilty by reason of insanity."
If you find that the state has proved all the elements of the crime beyond a reasonable doubt including the required mental state, you must find the defendant "guilty" regardless of whether or not he suffered from a mental disease or defect.
If you find the defendant "guilty," you should go on to consider whether he is "guilty but mentally ill." A defendant is "guilty but mentally ill" if you find by a preponderance of the evidence he lacked the substantial capacity to appreciate the wrongfulness of his conduct or to conform his conduct to the requirements of the law, you shall find him "guilty but mentally ill."
Finally, if the state has failed to prove all the elements of its case beyond a reasonable doubt, you must find the defendant "not guilty."
[9]  Instruction No. 15 reads as follows:

In the indictment the defendant is charged with Escape in the Second Degree. A person commits the crime of Escape in the Second Degree if without lawful authority he knowingly removes himself from a correctional facility while under official detention. In order to establish the crime of Escape in the Second Degree, it is necessary for the State to prove beyond a reasonable doubt the following:
First, that the event in question occurred at or near Palmer, Alaska, and on or about May 7, 1986.
Second, that David Barrett knowingly removed himself from a correctional facility.
Third, that at the time of the removal he was under official detention.
[10]  A plain error is one that is obvious and substantially prejudicial. See Potts v. State, 712 P.2d 385, 390 (Alaska App. 1985). When the alleged error involves jury instructions argued in the presence of the court, a finding of plain error is tantamount to a finding of ineffective assistance of counsel. Id. at 394 n. 11. We customarily consider issues of plain error when the defendant remains silent, failing to object to an alleged error, and then urges the error on appeal. There is a related doctrine called "invited error." "Invited error" occurs when the court takes erroneous action at the express request of the defendant, and then the defendant urges reversal on that basis on appeal. See People v. Alvarez, 763 F.2d 1036, 1037-38 (9th Cir.1985) (indicating that an appellate court may decline to consider an "invited error" even if the error would otherwise qualify as a plain error); United States v. Gray, 626 F.2d 494, 501 n. 2 (5th Cir.1980) (indicating same), cert. denied, 449 U.S. 1091, 101 S.Ct. 887, 66 L.Ed.2d 820 (1981). Because we do not find plain error, it is not necessary for us to pursue this issue further.
[11]  It appears that this instruction was an oversight. The judge ruled that the jury should not be instructed about AS 12.47.010.
[12]  See supra note 1. We stress that the converse is not the same. Thus, the jury may reject the affirmative defense, which the defendant must prove by a preponderance of the evidence. Nonetheless, the jury may accept the claim of diminished capacity if the jury retains a reasonable doubt about whether the defendant knowingly committed the crime, and the reasonable doubt is based in part on the defendant's mental disease or defect. See Weston v. State, 682 P.2d 1119, 1122-23 (Alaska 1984) (in murder prosecution, trial court's error in not instructing jury on self-defense was not rendered harmless by jury's rejection of affirmative defense of imperfect self-defense, where verdict did not show that jury found beyond a reasonable doubt the defendant did not hold an actual belief that he was acting in self-defense).
[13]  AS 12.47.090 currently provides:

Procedure after raising defense of insanity. (a) At the time the defendant files notice to raise the affirmative defense of insanity under AS 12.47.010 or files notice under AS 12.47.020(a), the defendant shall also file notice as to whether, if found not guilty by reason of insanity under AS 12.47.010 or 12.47.020(b), the defendant will assert that the defendant is not presently suffering from any mental illness that causes the defendant to be dangerous to the public peace or safety.
(b) If the defendant is found not guilty by reason of insanity under AS 12.47.010 or 12.47.020(b), and has not filed the notice required under (a) of this section, the court shall immediately commit the defendant to the custody of the commissioner of health and social services.
(c) If the defendant is found not guilty by reason of insanity under AS 12.47.010 or 12.47.020(b), and has filed the notice required under (a) of this section, a hearing shall be held immediately after a verdict of not guilty by reason of insanity to determine the necessity of commitment. The hearing shall be held before the same trier of fact as heard the underlying charge. At the hearing, the defendant has the burden of proving by clear and convincing evidence that the defendant is not presently suffering from any mental illness that causes the defendant to be dangerous to the public. If the court or jury determines that the defendant has failed to meet the burden of proof, the court shall order the defendant committed to the custody of the commissioner of health and social services. If the hearing is before a jury, the verdict must be unanimous.
(d) A defendant committed under (b) or (c) of this section shall be held in custody for a period of time not to exceed the maximum term of imprisonment for the crime for which the defendant was acquitted under AS 12.47.010 or AS 12.47.020(b) or until the mental illness is cured or corrected as determined at a hearing under (e) of this section.
(e) A defendant committed under (b) or (c) of this section may have the need for continuing commitment under this section reviewed by the court sitting without a jury under a petition filed in the superior court at intervals beginning no sooner than a year from the defendant's initial commitment, and yearly thereafter. The burden and standard of proof at a hearing under this subsection are the same as at a hearing under (c) of this section. A copy of all petitions for release shall be served on the attorney general at Juneau, Alaska. A copy shall also be served upon the attorney of record, if the attorney of record is not the attorney general, who represented the state or a municipality at the time the defendant was first committed.
(f) Continued commitment following expiration of the maximum term of imprisonment for the crime for which the defendant was acquitted under AS 12.47.010 or 12.47.020(b) is governed by the standards pertaining to civil commitments as set out in AS 47.30.735.
(g) A person committed under this section may not be released during the term of commitment except upon court order following a hearing in accordance with (e) of this section. On the grounds that the defendant has been cured of any mental illness that would cause the defendant to be dangerous to the public peace or safety, the state may at any time request the court to hold a hearing to decide if the defendant should be released.
(h) The commissioner of health and social services or the commissioner's authorized representative shall submit periodic written reports to the court on the mental condition of a person committed under this section.
(i) An order entered under (c) or (e) of this section may be reviewed by the court of appeals on appeal brought by either the defendant or the state within 40 days from the entry of the order.
(j) In this section,
(1) "dangerous" means a determination involving both the magnitude of the risk that the defendant will commit an act threatening the public peace or safety, as well as the magnitude of the harm that could be expected to result from this conduct; a finding that a defendant is "dangerous" may result from a great risk of relatively slight harm to persons or property, or may result from a relatively slight risk of substantial harm to persons or property;
(2) "mental illness" means any mental condition that increases the propensity of the defendant to be dangerous to the public peace or safety; however, it is not required that the mental illness be sufficient to exclude criminal responsibility under AS 12.47.010, or that the mental illness presently suffered by the defendant be the same one the defendant suffered at the time of the criminal conduct.
(k) If the court finds that a defendant committed under (b) or (c) of this section can be adequately controlled and treated in the community with proper supervision, the court may order the defendant conditionally released from confinement under AS 12.46.092 for a period of time not to exceed the maximum term of imprisonment for the crime for which the defendant was acquitted under AS 12.47.010 or 12.47.020(b) or until the mental illness is cured or corrected, whichever first occurs, as determined at a hearing under (c) of this section.
[14]  AS 12.47.050 currently provides:

(a) If the trier of fact finds that a defendant is guilty but mentally ill, the court shall sentence the defendant as provided by law and shall enter the verdict of guilty but mentally ill as part of the judgment.
(b) The Department of Corrections shall provide mental health treatment to a defendant found guilty but mentally ill. The treatment must continue until the defendant no longer suffers from a mental disease or defect that causes the defendant to be dangerous to the public peace or safety. Subject to (c) and (d) of this section, the Department of Corrections shall determine the course of treatment.
(c) When treatment terminates under (b) of this section, the defendant shall be required to serve the remainder of the sentence imposed.
(d) Notwithstanding any contrary provision of law, a defendant receiving treatment under (b) of this section may not be released
(1) on furlough under AS 33.30.101-33.30.131, except for treatment in a secure setting; or
(2) on parole.
(e) Not less than 30 days before the expiration of the sentence of a defendant found guilty but mentally ill, the commissioner of corrections shall file a petition under AS 47.30.700 for a screening investigation to determine the need for further treatment of the defendant if
(1) the defendant is still receiving treatment under (b) of this section; and
(2) the commissioner has good cause to believe that the defendant is suffering from a mental illness that causes the defendant to be dangerous to the public peace or safety; in this paragraph, "mental illness" has the meaning given in AS 47.30.915.
[15]  At the outset, it should be recognized that procedures very similar to these have been approved for defendants found not guilty by reason of insanity (under former law), despite challenges similar to those interposed by Barrett. See, e.g., State v. Alto, 589 P.2d 402, 405-08 (Alaska 1979); Blackburn v. State, 661 P.2d 1100, 1101 (Alaska App. 1983); Clark v. State, 645 P.2d 1236, 1239-41 (Alaska App. 1982).
[16]  AS 12.47.060 provides for a finding of guilty but mentally ill where the defendant does not rely on AS 12.47.010 or 12.47.020 at trial. That statute does not figure in this appeal. See also AS 12.47.080 (providing for commitment proceeding when a defendant is acquitted and evidence of mental illness was heard by the jury).
[17]  A finding that mental illness was a cause of criminal behavior does not automatically establish the mitigating factor or require an adjustment of the presumptive term. See Nashoalook v. State, 744 P.2d 420, 423 (Alaska App. 1987).
