
769 N.E.2d 920 (2002)
199 Ill.2d 378
264 Ill.Dec. 83
The PEOPLE of the State of Illinois, Appellee,
v.
David BELCHER, Appellant.
No. 91417.
Supreme Court of Illinois.
April 4, 2002.
Rehearing Denied May 29, 2002.
*921 Danial D. Yuhas, Deputy Defender, Robert Neal Markfield, Assistant Defender, Office of the State Appellate Defender, Springfield, for appellant.
James E. Ryan, Attorney General, Springfield (Joel D. Bertocchi, Solicitor General, Willian L. Browers, Mary Beth Burns, Assistant Attorneys General, Chicago, of counsel), for the People.
Justice FREEMAN delivered the opinion of the court:
In the circuit court of Champaign County, defendant, David Belcher, pled guilty to one count of first degree murder (720 ILCS 5/9-1(a)(2) (West 1996)) in exchange for the dismissal of other charges and received a sentence of 60 years' imprisonment. The trial court denied defendant's motion to reconsider sentence. On appeal, the appellate court declined to vacate defendant's guilty plea and sentence or allow him leave to file a motion to withdraw his guilty plea in the trial court. However, the appellate court found that the certificate defense counsel filed with the motion to reconsider sentence did not meet the requirements of Supreme Court Rule 604(d). The appellate court therefore remanded the matter so that defense counsel could comply with Rule 604(d) and file a new motion to reconsider sentence. People v. Belcher, No. 4-96-0959, 296 Ill. App.3d 1087, 244 Ill.Dec. 886, 726 N.E.2d (1998) (unpublished order under Supreme Court Rule 23).
On remand, the trial court denied defendant's motion to reconsider sentence. Defendant appealed and the appellate court affirmed its previous order denying defendant leave to file a motion to withdraw his guilty plea. No. 4-99-0755. We granted defendant's petition for leave to appeal (177 Ill.2d R. 315(a)), and for the reasons that follow we reverse and remand.

BACKGROUND
In 1996, defendant was charged with seven counts of first degree murder and two counts of residential burglary in connection with the murder of Nathan Ehler on February 28, 1996. Prior to trial, defendant moved for the appointment of a psychiatrist. The court ordered Dr. Lawrence Jeckel to examine defendant as to his sanity at the time of the alleged offense and his fitness to stand trial.
Dr. Jeckel found defendant fit to stand trial. He also found, pursuant to section 6-2(a) of the Criminal Code, that defendant was sane at the time of the offense. 720 ILCS 5/6-2(a) (West 1996).[1] Specifically, Dr. Jeckel stated in his report, and in testimony later given at defendant's sentencing hearing, that defendant "appreciated the criminality of his conduct at the time of the alleged crime." Based on this evaluation, defendant stipulated to being *922 fit to stand trial. He also pled guilty to one count of first degree murder (720 ILCS 5/9-1(a)(2) (West 1996)) in exchange for the dismissal of all other charges, pursuant to a plea agreement with the State. There was no agreement as to sentencing, and in fact, the State gave notice that it was seeking the death penalty. The trial court fully admonished defendant in accordance with Supreme Court Rule 402 (see 134 Ill.2d R. 402). The court determined that there was a factual basis for the plea, noted the plea agreement, and found defendant's plea voluntary and knowing. For these reasons the trial court accepted defendant's plea of guilty.
Defendant's sentencing hearing was held approximately 29 days after his plea was accepted by the trial court. At the hearing, Dr. Jeckel testified that he would have found defendant insane at the time of the alleged offense under the prior version of the insanity statute. 720 ILCS 5/6-2(a) (West 1994). This was due to the fact that defendant was unable to "conform his conduct to the requirements of law." As noted above, at the close of the hearing the trial court sentenced defendant to 60 years of imprisonment.
On appeal, the appellate court found that the certificate defense counsel filed with the motion to reconsider sentence did not meet the requirements of Supreme Court Rule 604(d). The appellate court noted that the certificate requirements of Rule 604(d) must be strictly complied with, and that the remedy for noncompliance is a remand to the trial court for the filing of a new motion to withdraw the guilty plea or reconsider the sentence, and a new hearing on the motion. The appellate court observed that defense counsel could not have reviewed the transcript of the sentencing hearing since the hearing on the motion to reconsider was combined with the sentencing hearing. Further, the appellate court observed that it appeared from the record that counsel did not communicate with defendant to ascertain his contentions of error in the sentence or entry of the guilty plea.
During the pendency of this direct appeal, defendant alerted the appellate court to the fact that Public Act 89-404 was unconstitutional, citing this court's decision in Johnson v. Edgar, 176 Ill.2d 499, 224 Ill.Dec. 1, 680 N.E.2d 1372 (1997). The appellate court was also aware of its holding in People v. Pitts, 295 Ill.App.3d 182, 229 Ill.Dec. 451, 691 N.E.2d 1174 (1998), that Public Act 89-404 was enacted in violation of the single subject rule and that the new version of the insanity statute could not stand. Defendant requested that the appellate court vacate his guilty plea and sentence or, in the alternative, grant him leave to file a motion to withdraw his guilty plea in the trial court. The appellate court declined this opportunity to grant either of defendant's requests.
Defendant's appeal proceeded as noted at the outset of this opinion. Additional facts will be set forth as needed in the analysis portion of our discussion.

ANALYSIS
Defendant contends that the appellate court erred in denying his request to vacate his guilty plea. The State responds that defendant cannot challenge the validity of his guilty plea because he did not properly move to vacate his plea in the trial court prior to raising this issue on appeal. Defendant rejoins that he asked for leave to vacate his plea at the first available opportunity. The State is correct in its assertion that defendant did not file a motion to withdraw his guilty plea within the allotted time of Rule 604(d) and, in the usual circumstances, such a failing would leave a defendant without remedy. But this is not the usual case. While it is *923 true this court does not approve of any failure to comply strictly with the explicitly stated requirements of Rule 604(d) (People v. Wilk, 124 Ill.2d 93, 103, 124 Ill.Dec. 398, 529 N.E.2d 218 (1988)), the unusual and fact-specific circumstances found in this case lead us to believe that the ends of justice will be better served by permitting defendant leave to file a motion to withdraw his guilty plea in the trial court.
As noted above, Dr. Jeckel found defendant sane at the time of the offense, pursuant to the insanity provisions enacted as part of Public Act 89-404. It is important to understand that these provisions made it more difficult for a defendant to assert the affirmative defense of insanity than the former version of the law with its broader definition of insanity. See People v. Ramsey, 192 Ill.2d 154, 156, 248 Ill.Dec. 882, 735 N.E.2d 533 (2000) (noting the differences between the two versions of the insanity statute and explaining that the provisions of Public Act 89-404 narrowed the definition of insanity). "The amended version of the law was significant because it altered the definition of insanity." Ramsey, 192 Ill.2d at 156, 248 Ill.Dec. 882, 735 N.E.2d 533. "Under the amendment, a defendant could no longer raise an insanity defense based on his inability `to conform his conduct to the requirements of law.'" Ramsey, 192 Ill.2d at 156, 248 Ill.Dec. 882, 735 N.E.2d 533, quoting 720 ILCS 5/6-2(a) (West 1994). Since the time of defendant's guilty plea, the courts of this state have repeatedly held that Public Act 89-404 is unconstitutional because it was enacted in contravention of the single subject rule. People v. Reedy, 186 Ill.2d 1, 237 Ill.Dec. 74, 708 N.E.2d 1114 (1999); People v. Pitts, 295 Ill.App.3d 182, 229 Ill.Dec. 451, 691 N.E.2d 1174 (1998).
The representation made by Dr. Jeckel to the court and to defendant foreclosed the availability of the affirmative defense of insanity by defendant. In light of these circumstances, defendant pled guilty to the murder. Defendant argues that Dr. Jeckel's conclusion led him to forgo the opportunity this affirmative defense offers. We now know that the insanity provisions used at trial were enacted in contravention of the single subject rule. Had this fact been known to defendant at that time, his decision to forgo the affirmative defense and to enter a guilty plea might have been different. In fact, Dr. Jeckel testified that under the former version of the insanity statute, his opinion of defendant's sanity at the time of the offense would change. He would conclude that defendant was insane at the time of the murder because defendant was unable to conform his conduct to the requirements of law.
We emphasize that Dr. Jeckel was a court-appointed psychiatrist who opined that defendant was sane at the time of the murder. The trial court relied upon that representation in accepting defendant's guilty plea. In light of the case law noted above, it now appears that the court's expert, the court and defendant may have been operating under a misapprehension of law. Lastly, we note that defendant asked the appellate court to vacate his guilty plea at the earliest opportunity and did not wait until the eleventh hour to raise the issue.
These unusual circumstances lead us to believe that defendant should be given an opportunity to file a motion to vacate his guilty plea. The basis for vacatur of the guilty plea, misapprehension of the law, is well recognized in our jurisprudence. People v. Morreale, 412 Ill. 528, 107 N.E.2d 721 (1952).

CONCLUSION
For the aforementioned reasons, the judgments of the circuit and appellate *924 courts are reversed and the cause is remanded to the trial court.
Judgments reversed; cause remanded.
NOTES
[1]  The version of the insanity statute in effect at the time of defendant's trial provided:

"(a) A person is not criminally responsible for conduct if at the time of such conduct, as a result of mental disease or mental defect, he lacks substantial capacity to appreciate the criminality of his conduct." 720 ILCS 5/6-2(a) (West 1996).
The prior version of the insanity statute provided:
"(a) A person is not criminally responsible for conduct if at the time of such conduct, as a result of mental disease or mental defect, he lacks substantial capacity either to appreciate the criminality of his conduct or to conform his conduct to the requirements of law." 720 ILCS 5/6-2(a) (West 1994).
