delivered the opinion of the court:
This appeal emanates from a criminal prosecution of defendant Albert Johnson, also known as Dale Lytle, based upon the commission of an armed robbery, which resulted in defendant’s conviction. A judgment was entered on a finding of guilty by the trial court, sitting with a jury, and defendant was sentenced to a term of not less than two years nor more than two years and one day.
The important aspects of the proceedings below can be summarized as follows. On September 10, 1970, defendant was indicted by the grand jury for the commission of an armed robbery alleged to have taken place on May 20, 1970. Upon the filing, on September 17, 1970, of a petition for leave to have defendant admitted to a mental institution1, an order was entered requiring the examination of defendant by the staff of The Psychiatric Institute of the circuit court of Cook County.
Dr. R. A. Reifman, assistant director at The Psychiatric Institute, examined defendant on October 6, 1970, and, on October 21, 1970, filed his report with the court. The results of the examination were that defendant was “* * * diagnosed as schizophrenic reaction, undifferentiated. He is inappropriate, infantile with ideas that people stare at him. He does not understand what he is charged with; does not understand the judicial process and he speaks in a barely audible voice. He is not competent to stand trial; does not appear to understand the nature and *682purpose of the proceedings and doesn’t appear able to cooperate with counsel.”
A competency hearing was held before an impaneled jury on October 22, 1970, and defendant was adjudged incompetent to stand trial and by order of court was committed to the Illinois Department of Mental Health until fully and permanently recovered from his incompetency. In March, 1971, upon order of the presiding judge of the criminal division of the circuit court, defendant was again examined by Dr. Reifman, and the results of that examination, filed with the court on March 24, 1971, read, in pertinent part: “* * * this previously adjudicated incompetent person has improved sufficiently by virtue of his hospitalization to be considered COMPETENT to stand trial at this time. He understands the nature and purpose of the proceedings and is able to assist in his own defense. Therefore, in conclusion, he is COMPETENT to stand trial.” (Capitals in the original.)
On March 31, 1971, defendant’s case was called for trial on the question of his competency to stand trial on the armed robbery charge. Defendant was represented by the public defender through an assistant of that office. The following colloquies, set down in detail in order that the proceedings below be placed in full perspective, took place:
“THE CLERK: Albert Johnson.
THE COURT: Albert Johnson, according to the doctor’s report that I read, you were declared fully competent and able to stand trial. You can cooperate with your attorney very well, and you understand the charges that are placed against you, and so forth.
Do you understand that?
THE DEFENDANT: Yes, sir.
THE COURT: Now, you have a right to waive a jury trial. You understand that, are you sure?
THE DEFENDANT: Yes, sir.
THE COURT: Do you understand how many people there are on a jury trial?
THE DEFENDANT: Twelve people.
THE COURT: Twelve people to declare you competent or incompetent. And the doctor, if he were to testify, and this were uncontested, then the jury would declare that you are fully competent.
Now, are you prepared to waive the jury and to be tried by me and I will accept the doctor’s statement without the benefit of a jury, is that agreeable with you?
THE DEFENDANT: That’s agreeable.
*683THE COURT: All right, under the circumstances, Mr. Sammons [counsel for defendant], I am going to ask your client if he wiU waive a jury trial, insofar as competency.
MR. SAMMONS: Insofar as competency, he will, Your Honor, and I am handing him the regular form. He is endorsing it in his own hand.
THE COURT: Albert, this is your signature, and nobody threatened you, nobody used any force on you?
THE DEFENDANT: Right.
# # #
THE COURT: All right, we will file this then, and, Mr. Sammons, you wish to read the statement for the record.
MR. SAMMONS: I take it the State is ready to proceed on a petition to have Mr. Johnson restored, am I right?
MR. PARRISH [assistant state’s attorney]: You are correct.
MR. SAMMONS: In that event, let it be stipulated between Albert Johnson, the petitioner, and the State’s Attorney of Cook County, Edward V. Hanrahan, through his assistants that in indictment Number 70-2688 that in this cause if Dr. Robert A. Reifman, medical doctor, Assistant Director of the Psychiatric Institute of the Circuit Court of Cook County were called as a witness to testify in this case that he would testify he is licensed to practice medicine and specializes in the field of psychiatric diseases of the mind and would testify further that on March 10, 1971 he examined Albert Johnson, the petitioner in this cause, and as a result of that examination that he found that said Albert Johnson who had previously been adjudicated incompetent, had improved sufficiently by virtue of his hospitalization to be considered competent to stand trial.
At this time he would further testify that at the present time Albert Johnson understands the nature and the purpose of the proceedings in this indictment and is able to assist in his own defense, and that it is his opinion that Albert Johnson is competent to stand trial.
MR. PARRISH: So stipulated.
THE COURT: I would say that if Dr. Reifman says that he is competent to stand trial, because in my opinion Dr. Reifman is probably the best doctor that they have in that entire staff, you are competent to stand trial.
MR. SAMMONS: And the State has nothing to offer in rebuttal?
MR. PARRISH: Nothing.
*684THE COURT: Now you are declared competent.
MR. SAMMONS: Motion for judgment of competency.
THE COURT: So ordered.”
Thereafter, defendant was tried by a jury on the armed robbery charge, and, on June 11, 1971, defendant was found guHty of armed robbery. He was then sentenced to be confined in the Illinois State Penitentiary.
On review, defendant assigns a number of errors, but, in view of our decision, it is necessary to consider only one: whether the trial and the adjudgment of guilt were void in that defendant, having been adjudged incompetent to stand trial on the stated charge, was not legally restored to competency.
Illinois’ Criminal Code (Ill. Rev. Stat. 1971, ch. 38, par. 104 — 12) defines an “incompetent” as:
“[A] person charged with an offense who is unable because of a mental condition:
(a) To understand the nature and purpose of the proceedings against him; or
(b) To assist in his defense; or
(c) After a death sentence has been imposed, to understand the nature and purpose of such sentence.”
Section 104 — 2 of the same chapter provides, in pertinent part:
“(a) If before a trial, or after a judgment has been entered but before pronouncement of sentence, * * * the court has reason to believe that the defendant is incompetent the court shall suspend the proceedings and shaH impanel a jury to determine the defendant’s competency. If a jury is waived by the defendant, the court shall conduct a hearing to determine the defendant’s competency.”
Further, section 104 — 3 of chapter 38 reads, in a portion essential to the case at hand:
“(b) When reasonable grounds exist to believe that an incompetent is now competent the court * * * shaH conduct a hearing in accordance with this Article to determine the person’s present mental condition.”
“The sanity hearing which is thus prescribed is no empty formaMty, *685but is designed to preserve the constitutional right of a defendant not to be placed on trial while he is insane. It is, therefore, of great importance that such a hearing should be free from prejudicial error and that such a hearing proceed in accordance with proper rules of evidence and that the jury be properly instructed as to the law.”
Thus, it is fundamental that an incompetent person cannot be tried for a crime and that it is a denial of due process of law to place such a person on trial. People v. Burson (1957), 11 Ill.2d 360,143 N.E.2d 239; People v. Reeves (1952), 412 Ill. 555, 107 N.E.2d 861; People v. McKinstray (1964), 30 Ill.2d 611, 198 N.E.2d 829.
The circumstances involved in People v. Reeves were, in many particulars, strikingly similar to those presented in the instant case. Prior to trial in Reeves, the defendant had been found insane after a psychiatric examination and was subsequently found insane by a jury and committed. A petition was later filed by defendant’s counsel to the effect that defendant had recovered from insanity and was in a position to cooperate with counsel. A jury was impaneled to determine whether defendant had recovered, and the court, relying upon defense counsel’s stipulation to his client’s recovery, instructed the jury to return a finding of sanity. In reversing defendant’s conviction in Reeves, the court stated at page 560:
“If a defendant is insane and unable to answer for himself, he certainly is in no position to authorize his counsel to stipulate, nor is- counsel warranted in stipulating, to his restoration, which is the very issue the jury is sworn to try.”
On March 31, 1971, when the instant defendant appeared before the trial court, the question of import was defendant’s present mental condition. Having been legally found incompetent by a jury on October 22, 1970, it was necessary to conduct a hearing in accordance with the provisions of chapter 38, section 104 — 3(b). The purpose of the new hearing (often referred to as a restoration hearing) was to determine whether defendant, on March 31, 1971, had the capacity to understand the nature and purpose of the proceedings against him and whether he was able to assist in his defense against the crime charged, in accordance with chapter 38, section 104 — 1, above quoted.
As set forth in People ex rel. Suddeth v. Rednour (1965), 33 Ill.2d 278, 283, 211 N.E.2d 281, it was the intent of the legislature to extend the right to a jury trial in a restoration hearing under chapter 38, section 104 — 3(b).3
*686Thus, the important questions to be answered are, first, whether a person, legally adjudged incompetent some five months earlier, can waive his right to a jury trial at a restoration proceeding; and, secondly, whether counsel for a legally incompetent person can stipulate, on behalf of said person, as to the crucial, expert medical testimony on the question of competency to stand trial.
In 1952, our supreme court in the Reeves case said, at page 561:
“[T]he courts should exercise care to see that restoration proceedings be determined as directed by statute; that the issue submitted as one of fact be determined by the jury; and that directed verdicts be sparingly used only where the evidence properly warrants that action. They should not exercise the prerogative of directing a verdict solely upon the unsupported stipulation, agreement, or plea, alone, made by the accused or by his counsel.”
In Pate v. Robinson (1966), 383 U.S. 375, 15 L.Ed.2d 815, 86 S.Ct. 836, a murder case involving questions of incompetence to stand trial and sanity at the time of the shooting, Justice Clark, speaking for the court, stated succinctly, at page 384:
“The State insists that Robinson deliberately waived the defense of his competence to stand trial by failing to demand a sanity hearing as provided by Illinois law. But it is contradictory to argue that a defendant may be incompetent, and yet knowingly or intelligently waive’ his right to have the court determine his capacity to stand trial.”
Applying the aforesaid principles to the facts at hand in the case before us, we find that defendant herein was in no position to knowingly and understandingly waive his right to a trial by jury on March 31, 1971, as he had been adjudged incompetent on October 22, 1970, and remained in that state of legal incompetence on the day on which he appeared before the court. Further, unless properly waived, which it could not have been, defendant was entitled to a trial by jury with regard to his restoration to competency in keeping with Illinois’ Criminal Code (Ill. Rev. Stat. 1971, ch. 38, par. 104 — 1 et seq.) and People ex rel. Suddeth v. Rednour. Moreover, to draw upon the logic of the McKinstray decision, cited above, to accept defendant’s opinion, and that of his counsel by stipulation, that he was able to cooperate with counsel in his defense, when the purpose of a competency hearing in defendant’s behalf was to determine that very fact, would be to make a sham out of the restoration hearing.
It is to be noted that at the restoration hearing, at trial, and on this appeal, defendant’s counsel has been the public defender of Cook County. True, one assistant from that office appeared in the trial court *687(and stipulated to the jury waiver and expert testimony) and different assistants prosecuted the appeal. However, the simple fact remains that defendant was represented at all times by the same attorney. That being the case, questions of propriety and waiver arise and must be considered.
Under certain circumstances, conduct such as that for which the public defenders office was responsible in the instant case would justify our disregarding the errors alleged to have been committed in the trial court. Those circumstances are set forth in chapter 13, section 672 of the Illinois Law and Practice, Appeal and Error, which reads, in pertinent part:
“A party cannot complain of errors which he has committed, invited or induced the court to commit, or to which he consented. A party who has assented to, or recognized the validity of, matters or proceedings not constituting fundamental error cannot complain thereof on appeal * * (Emphasis supplied.)
There are also court decisions which distinguish between such errors which arise in cases where parties are represented by counsel of a defendant’s own choosing — where courts generally hesitate to grant relief —and those where defendants are represented by court-appointed counsel — where courts are more apt to grant relief.
We held in People v. Santoro, 13 Ill.App.3d 426, that competency to stand trial is a jurisdictional issue and cannot be waived. Because the right to a jury trial and the questions raised on appeal in this particular case are so fundamental, we hold that, notwithstanding his consent to the action of his trial counsel and notwithstanding that defendant’s appellate counsel is the same attorney as his trial counsel, defendant is not estopped to complain thereof before this court.
In conclusion, because no valid restoration hearing adjudging defendant competent to stand trial was held subsequent to the October 22, 1970 hearing, wherein he was adjudged incompetent, defendant should not have been placed on trial. (Ill. Rev. Stat. 1971, ch. 38, par. 104 — 2 and 104 — 3.) Therefore, the judgment convicting defendant of armed robbery must be reversed. Likewise the order of March 31, 1971 finding the defendant competent is set aside.
Accordingly, the judgment of the circuit court of Cook County is reversed, and the cause is remanded for a restoration hearing consistent with this opinion and such other proceedings as may be appropriate.
Reversed and remanded.
LEIGHTON and HAYES, JJ., concur.