
50 Ill. App.3d 525 (1977)
365 N.E.2d 988
THE PEOPLE OF THE STATE OF ILLINOIS, Plaintiff-Appellee,
v.
GREGORY PIERCE, Defendant-Appellant.
Nos. 60801, 76-718 cons.
Illinois Appellate Court  First District (4th Division).
Opinion filed June 30, 1977.
Rehearing denied July 14, 1977.
*526 James J. Doherty, Public Defender, of Chicago (Marc Fogelberg, Assistant Public Defender, of counsel), for appellant.
Bernard Carey, State's Attorney, of Chicago (Laurence J. Bolon, Michael E. Shabat, Paul Benjamin Linton, and Edward H. Phillips, Assistant State's Attorneys, of counsel), for the People.
Affirmed in part and vacated in part.
Mr. JUSTICE JOHNSON delivered the opinion of the court:
Gregory Pierce, the defendant, appeals his convictions for attempt murder and aggravated battery, and appeals the order of the circuit court of Cook County denying his amended post-conviction petition.
The defendant was charged by indictment with attempt murder (Ill. Rev. Stat. 1971, ch. 38, par. 8-4), and with two counts of aggravated battery (Ill. Rev. Stat. 1971, ch. 38, par. 12-4(b)(1)), relating to the shooting of Herman Jones on May 6, 1972. On October 20, 1972, a bench trial commenced, defendant having waived trial by jury. Pierce testified as the sole witness in his behalf, generally denying the allegations of the State's witnesses. He also denied that the gun received in evidence was his and that he shot Herman Jones. Pierce was found guilty on all counts. At the hearing in aggravation and mitigation immediately following the trial, the defendant's mother, Mrs. Ginnie Pierce, testified that "sometime he don't seem like he know what he is doing," and she thought he should see a doctor. Following Mrs. Pierce's testimony, the trial judge sua sponte ordered the defendant to undergo a behavioral clinic examination.
The defendant was examined on November 9, 1972, and in the psychiatrist's opinion he was incompetent to be sentenced. On January 5, 1973, a competency hearing was held. The court offered the defense a jury determination of the issue, but defense counsel waived a jury. Dr. Malek, a psychiatrist, testified that he had examined the defendant on November 9, 1972, and it was his opinion that Pierce was incompetent. He further testified that his opinion only related to defendant's competency on November 9, and that he had no opinion of defendant's competency on October 20, 1972, the date of his trial. Defendant was *527 found incompetent to be sentenced and remanded to the Department of Mental Health.
On October 12, 1973, the defendant appeared before Judge Dunne for a restoration hearing. The defendant did not demand a jury and, proceeding by stipulation, was found fit to be sentenced. He was thereafter sentenced to a term of 7 to 20 years for attempt murder with no sentence imposed on the aggravated battery counts. Notice of appeal was filed on October 15, 1973.
On January 28, 1976, defendant filed an amended post-conviction petition. A motion to dismiss the petition was filed by the State and, after a hearing, the petition was dismissed. An appeal was taken from this order which was consolidated with defendant's direct appeal.
The issues presented for review are (1) whether defendant knowingly waived his right to trial by jury where the trial judge sua sponte ordered a behavioral clinic examination of the defendant at the aggravation and mitigation hearing which was on the same day as the trial and jury waiver; (2) whether section 5-2-2(b) of the Unified Code of Corrections (Ill. Rev. Stat. 1973, ch. 38, par. 1005-2-2(b)) is unconstitutional; (3) whether defendant's convictions for aggravated battery must be reversed; and (4) whether the trial court erred in dismissing defendant's amended post-conviction petition.
Regarding the first issue presented for review, defendant relies solely on People v. Polito (1974), 21 Ill. App.3d 182, 315 N.E.2d 84, and he proposes that it is sufficiently analogous to the present case so as to lend support to his contention that where there was sufficient doubt of appellant's competence on the day of the jury waiver, so as to cause the court on its own motion to order a behavioral clinic examination, appellant did not knowingly waive his right to trial by jury. In Polito, the court found that the defendant, who had previously been adjudicated incompetent, had an absolute statutory right under section 104-2 of the Code of Criminal Procedure of 1963 (Ill. Rev. Stat. 1971, ch. 38, par. 104-2) (repealed by Pub. Act 77-2097, effective Jan. 1, 1973) to a trial by jury on the issue of restoration. Once the defendant had been adjudicated incompetent to stand trial, he could not knowingly and intelligently waive his statutory right to a jury at the restoration hearing. The instant case does not involve a defendant who was adjudicated incompetent to stand trial. Furthermore, the jury waiver questioned herein is a trial jury waiver, not a waiver at a restoration hearing or at a competency hearing. Therefore, the Polito case is inapposite.
It is within the sound discretion of the trial judge to decide whether the facts and circumstances of a case raise a bona fide doubt of defendant's competency so as to require a hearing. People v. Daliege (1976), 40 Ill. App.3d 706, 709, 352 N.E.2d 247, 250.
*528  1 The record shows that the defendant was competent at the time of his jury waiver, that he competently testified in his own behalf, and that at no time did counsel complain that the defendant could not or would not cooperate with him. There was no showing of a history of mental disorders or of recent psychiatric hospitalization at the trial which could raise a bona fide doubt of defendant's competence to stand trial. (People v. Fontaine (1975), 28 Ill. App.3d 450, 328 N.E.2d 685; People v. Chambers (1973), 16 Ill. App.3d 177, 305 N.E.2d 634 (abstract opinion).) No motion was made regarding defendant's competence to stand trial before or during the trial, nor did any circumstances exist, nor was any evidence presented, which would raise a bona fide doubt as to defendant's competence before or during trial, which would compel the court to conduct an unrequested hearing into the defendant's competency. Because the trial court did not possess a bona fide doubt of defendant's competency to stand trial, it did not abuse its discretion in failing to order a competency hearing.
 2 The judge ordered defendant to undergo a behavioral clinic examination after judgment but before sentencing. He ordered the examination after the defendant's mother testified at the aggravation and mitigation hearing which followed the trial. Referral to the behavioral clinic does not of itself raise a bona fide doubt as to the competency of the accused. (People v. Franklin (1971), 48 Ill.2d 254, 257, 269 N.E.2d 479, 481.) In fact, after the judge ordered the test, he remarked that the defendant's testimony and manner in court evidenced no irregularities, but he would be happy to have the test run because he is not a psychiatrist or a psychologist. Absent other indications of incompetency, the judge did not possess a bona fide doubt as to defendant's competency when he ordered the examination.
Assuming arguendo that the judge did possess a bona fide doubt as to defendant's competency at the aggravation and mitigation hearing, such doubt would have been raised after judgment but before sentencing, and, therefore, it would relate to defendant's competency to be sentenced, not to his competency to stand trial. In 1973, this view was codified by section 5-2-1(b) of the Unified Code of Corrections (Ill. Rev. Stat. 1973, ch. 38, par. 1005-2-1(b)), which provides that the question of defendant's fitness may be raised before or during trial and the question of the defendant's fitness to be sentenced may be raised after judgment but before sentence.
 3 Because no bona fide doubt as to defendant's competency to stand trial was ever raised, the defendant was competent to stand trial and his jury waiver was valid.
Next, defendant argues that People v. Duhr (1975), 27 Ill. App.3d 651, 327 N.E.2d 267, held that section 5-2-2(b) (Ill. Rev. Stat. 1973, ch. 38, *529 par. 1005-2-2(b)) abolished the statutory right to a jury trial at a competency restoration hearing and such an interpretation renders this section unconstitutional. According to his argument, because persons committed under the Mental Health Code (Ill. Rev. Stat. 1973, ch. 91 1/2, par. 1-1 et seq.) and the Sexually Dangerous Persons Act (Ill. Rev. Stat. 1971, ch. 38, par. 105-1.01 et seq.) are entitled to a jury trial at a restoration hearing, and because section 5-2-2(b) denies incompetents a jury trial, defendant was denied equal protection of the laws.
In Duhr, the defendant was found incompetent to stand trial before the trial commenced, was restored to competency after waiving a jury prior to the effective date of the new Unified Code of Corrections, and another restoration hearing was held after the new Unified Code of Corrections was enacted. The court held that People v. Polito (1974), 21 Ill. App.3d 182, 315 N.E.2d 84, was inapplicable and the procedure to be followed at the restoration hearing was the court, sitting without a jury, would hold a hearing unless defendant or his attorney made a demand for a trial by jury.
Furthermore, under the Mental Health Code (Ill. Rev. Stat. 1973, ch. 91 1/2, par. 1-1 et seq.), section 10-3 indicates that when a petition is filed under section 10-1, or section 10-7 which covers restoration hearings, or upon receipt or notification of receipt of a request under section 10-2, article IX of the Mental Health Code applies to the hearings. Under section 9-2 of the Code, the patient is entitled to a jury upon demand made by the patient, spouse, any relative or friend, or an attorney appearing for any of them.
Section 5 of the Sexually Dangerous Persons Act (Ill. Rev. Stat. 1971, ch. 38, par. 105-5) also provides that respondent in any proceedings under the Act may demand a trial by jury.
The jury rights under each act or code appear to be the same; i.e., that the petitioner or respondent may demand a trial by jury.
People v. Welsh (1975), 30 Ill. App.3d 887, 333 N.E.2d 572, gives an interpretation of section 5-2-2(b) of the Unified Code of Corrections (Ill. Rev. Stat. 1973, ch. 38, par. 1005-2-2(b)) and the procedure which is to be employed at a restoration hearing under this section. The defendant in Welsh entered his plea of not guilty and was thereafter adjudged incompetent. Several restoration hearings were held prior to 1973 without a jury and one was held in 1973 without a jury wherein defendant was found competent to stand trial. According to Welsh, once a defendant has been adjudged incompetent, section 5-2-2(b) comes into play upon re-examination of the defendant. This section provides that the court, regarding restoration hearings, shall "proceed, find, and order as in the first instance under paragraph (a) of this Section." Subsection (a) provides:

*530 "If the defendant is found unfit to stand trial or be sentenced, the court shall remand the defendant to a hospital, as defined by the Mental Health Code of 1967 (ch. 91 1/2, par. 1-1 et seq.), and shall order that a hearing be conducted in accordance with the procedures, and within the time periods, specified in such Act."
This subsection is silent as to the procedure to be followed in redetermining the defendant's fitness to stand trial or to be sentenced.
The court found by construing the statute in its entirety that the procedure which subparagraph (b) sets out to be followed in redetermining the defendant's fitness to stand trial is the same as that of section 5-2-1(d) (Ill. Rev. Stat. 1973, ch. 38, par. 1005-2-1(d)) which applies to making the initial determination of a defendant's fitness. Section 5-2-1(d) provides:
"When the question of the defendant's fitness to stand trial is raised prior to the commencement of trial, the question shall be determined by the court, or by a jury. The defendant or the State may request a jury or the judge may on his own motion order a jury. When the question is raised after commencement of the trial, the question shall be determined by the court."
The court concluded that a jury's presence at a restoration hearing requires affirmative election on the part of the defendant.
The factual situation presented to the court in Welsh, however, did not involve the issue of competence after the trial commenced. Following the Welsh interpretation of these sections, the last sentence of section 5-2-1(d) would be controlling here. It is also evident that the question of competency to be sentenced is controlled by this sentence, due to the fact that section 5-2-1(b) (Ill. Rev. Stat. 1973, ch. 38, par. 1005-2-1(b)) provides in pertinent part that the question of the defendant's fitness to be sentenced may be raised after judgment but before sentence. However, whether the procedure under this sentence would allow the defendant to demand a jury trial is unclear. There is also some doubt as to whether the Welsh interpretation of these sections and the procedure outlined is correct.
 4 However, we need not clarify the procedure to be followed at a restoration hearing where incompetency to be sentenced is at issue nor decide whether a demand for a jury is included, because the defendant has failed to show that he is an aggrieved party under these statutes. It is an established rule that courts will not entertain objections to an allegedly unconstitutional feature where the objecting party is not in any way aggrieved thereby. (City of Chicago v. Lawrence (1969), 42 Ill.2d 461, 464, 248 N.E.2d 71, 73-74.) The defendant did not demand a jury nor was one denied. To the contrary, the defendant was offered the option of a jury, but refused to avail himself of that offer. Courts only determine the *531 validity of a statute or ordinance in light of the factual background presented by the record, not in the abstract. (City of Elmhurst v. Buettgen (1946), 394 Ill. 248, 254, 68 N.E.2d 278, 282; Rasmussen v. Village of Bensenville (1965), 56 Ill. App.2d 119, 127, 205 N.E.2d 631, 635.) Thus, even if the defendant properly interprets section 5-2-2(b) of the Unified Code of Corrections (Ill. Rev. Stat. 1973, ch. 38, par. 1005-2-2(b)), he has failed to show how he has been harmed, and, therefore, cannot test the constitutionality of the statute.
 5 Relating to the third issue, because defendant was not sentenced on the judgment of conviction for two counts of aggravated battery, and because this conviction arose from the same act as that for which defendant was convicted of attempt murder, his conviction for two counts of aggravated battery must be vacated. (People v. Lilly (1974), 56 Ill.2d 493, 309 N.E.2d 1.) The People conceded this point.
The final issue presented for review is did the trial court err in dismissing defendant's amended post-conviction petition. The only new issue raised by the defendant therein was whether he was denied due process of law when the trial court failed to sua sponte order an examination into his fitness to stand trial, because in an opinion rendered by the examining psychiatrist on November 9, 1972, 20 days after trial, the defendant was unfit to be sentenced, which purportedly raised a bona fide doubt of his fitness to stand trial.
"It is well established that where a direct appeal from a conviction has been taken, a defendant cannot raise in a post-conviction petition those issues which were or could have been reviewed in the direct appeal. (People v. Derengowski, 44 Ill.2d 476, 256 N.E.2d 455; People v. Dale, 406 Ill. 238, 92 N.E.2d 761) * * *. The scope of review permitted in a post-conviction proceeding is not expanded simply because the petition is filed before the reviewing court hands down an opinion. Once an issue is presented on direct appeal to a court of review, it cannot properly be considered at a post-conviction hearing even though at the time of the hearing the reviewing court has not passed upon the question." People v. Walker (1972), 6 Ill. App.3d 909, 911, 286 N.E.2d 812, 814-15.
 6 The issue raised in defendant's amended petition could have been reviewed in his direct appeal because the critical fact which relates to this issue, the November 9 examination opinion, was known prior to the filing of his notice of appeal. Two of the remaining three factors raised by the defendant in his amended petition also existed before the notice of appeal was filed. Only one factor was discovered after this period, and it is merely cumulative and does not raise a separate issue. Because this issue could have been raised on the direct appeal, it is not properly before this court on review of a post-conviction petition. The trial court was correct *532 in dismissing the amended post-conviction petition for it failed to enunciate any issues which had not been or could not have been raised in the direct appeal.
For the foregoing reasons, the judgment of the circuit court of Cook County convicting the defendant of attempt murder is affirmed, the conviction for two counts of aggravated battery is vacated, and the judgment dismissing the amended post-conviction petition is affirmed.
Affirmed in part; vacated in part.
DIERINGER, P.J., and ROMITI, J., concur.
