
127 Ill. App.3d 999 (1984)
470 N.E.2d 1054
THE PEOPLE OF THE STATE OF ILLINOIS, Plaintiff-Appellee,
v.
CHARLES WHITSON, Defendant-Appellant.
No. 3-83-0098.
Illinois Appellate Court  Third District.
Opinion filed June 14, 1984.
Modified on denial of rehearing August 2, 1984.
*1000 Robert Agostinelli and Gary Hicks, both of State Appellate Defender's Office, of Ottawa, for appellant.
Edward F. Petka, State's Attorney, of Joliet (John X. Breslin and Rita Kennedy Mertel, both of State's Attorneys Appellate Service Commission, of counsel), for the People.
Affirmed in part, reversed in part and remanded.
PRESIDING JUSTICE ALLOY delivered the opinion of the court:
On February 2, 1980, the defendant, Charles Whitson, was charged by indictment in the circuit court of Will County with four counts each of violation of enforcement of discipline, forcible detention, intimidation, unlawful restraint and armed violence. (Ill. Rev. Stat. 1979, ch. 38, pars. 1003-6-4(a), 10-4(a)(2), 12-6(a)(6), 10-3(a), 33A-2.) Twelve other persons were named as defendants in the same indictment. The four counts charging intimidation were dismissed prior to trial. Following a bench trial, the defendant was convicted of four counts of unlawful restraint and sentenced to four concurrent extended terms of six years of imprisonment to be served consecutive to the term he was already serving.
The facts giving rise to these charges have been set out clearly and at length in the briefs filed before this court and will, therefore, not be reiterated here except as they directly relate to a particular issue.
 1 We turn now to the first issue raised by the defendant: whether the court erred in requiring him to remain in shackles during the pretrial proceedings. With respect to this issue, the defendant argues *1001 that the court required him to remain shackled not because of a concern for safety but because the Department of Corrections would have withdrawn its supervisory personnel had the defendant been freed from all restraint.
To this argument of the defendant, the State responds, first, that the defendant waived the issue by failing to object, by objecting on different grounds at trial, and by failing to include the issue in his post-trial motion. Alternatively, the State argues that the shackling was proper and within the discretion of the trial judge. Finally, the State argues that, should the shackling of the defendant during pretrial proceedings be determined to be improper, the error was a harmless one.
Preliminarily, we note that the defendant was barred from most of the pretrial proceedings because of the prior misconduct of the codefendants as a group. We also note that the incident out of which the charges arose involved the takeover of the orientation unit of the Stateville Correctional Center by the defendant and his codefendants, who were at the time all residents of the maximum security confinement unit and death row unit at Stateville.
Second, we note that although this defendant, Charles Whitson, did not object to the shackling on the grounds now raised, namely that it interferes with his ability to communicate with counsel, affronts the dignity of the court, and allows the Department of Corrections to usurp the judicial function, nonetheless, he did object. In view of the inherent complexity of a trial of this type, involving 13 defendants, we believe that the objection was sufficiently made.
The objection was not, however, renewed in the post-trial motion of the defendant. The State had pointed out, and we agree, that the failure of the defendant to include an alleged error in a post-trial motion waives the error (People v. Armstrong (1983), 111 Ill. App.3d 471, 444 N.E.2d 276, 281-82); however, we find this question to be sufficiently significant that we elect to consider it under the doctrine of plain error. 87 Ill.2d R. 615.
 2 We are, therefore, confronted with the question of whether the court's decision that the defendant remain shackled in the courtroom during those pretrial proceedings at which he was present was an abuse of discretion. We believe that it was not.
In People v. Boose (1977), 66 Ill.2d 261, 268, 362 N.E.2d 303, 306, our supreme court adopted the position that a trial judge may not employ a general policy of imposing restraints on defendants who are prison inmates charged with a new offense absent a showing of necessity in the record. Boose involved a defendant who was required *1002 to appear shackled before a jury at his competency hearing; the only reason given by the court for the restraint was the nature of the crime with which he was charged.
In Boose, the court enumerated factors which might properly be considered by the trial judge in deciding that a defendant must remain shackled. Among these factors are: (1) the seriousness of the charge; (2) the defendant's physical, mental and emotional temperament and character; (3) the defendant's prior record; (4) past or present attempted escapes; (5) threat of harming others or of causing a disturbance; (6) risk of mob violence or attempting revenge or rescue; (7) the observers in the courtroom; (8) the nature and physical security of the courtroom; and (9) the adequacy and availability of alternative remedies. People v. Boose (1977), 66 Ill.2d 261, 266-67, 362 N.E.2d 303, 305-06.
In the instant case, the pretrial proceedings began on February 19, 1980, and continued until jury selection had begun on October 26, 1982. On July 16, 1981, the court decided to hear the pretrial motions without the defendants present unless testimony was required. According to the court, this measure was necessary for security reasons, tear gas having been required the last time that all defendants were present in the courtroom. This procedure was modified on August 11, 1981, to allow individual defendants to be present during the arguments of their attorneys. However, the court required the defendants to remain shackled while they were in the courtroom during the pretrial proceedings.
On appeal, the defendant now argues that the trial judge allowed the Department of Corrections to usurp his authority regarding the determination as to the necessity for shackles in the courtroom. The argument of the defendant is based on the fact that a letter from the Director of the Department of Corrections was read into the record during the pretrial proceedings. In that letter, the Director indicated that "[i]n the event that it is ordered that the restraints be removed, the Department of Corrections would regretfully be compelled to decline to provide further courtroom supervision of the individuals" based upon "* * * the security needs of these particular inmates and their past behavior in court during these proceedings." The defendant argues that the court did not believe that the shackling was necessary but only yielded to pressure from the Department of Corrections. We disagree.
Although we agree with the defendant that shackling in the courtroom is to be avoided whenever possible, we nonetheless recognize that, under certain circumstances, restraints are essential. (In re Staley *1003 (1977), 67 Ill.2d 33, 37-38, 364 N.E.2d 72, 73-74.) In the instant case, although the trial judge at one point did indicate that he did not fear for his own personal safety, nonetheless he consistently expressed concern regarding the need to maintain courtroom security. In this context he specifically indicated that the Will County Sheriff's Department was unable to provide sufficient security; it was, therefore, necessary that Department of Corrections personnel do so.
We are not here to judge the wisdom of the Department of Corrections' position, and we will not fault the court for maintaining security in the courtroom. It is abundantly clear from a review of the record as a whole that the court considered at length whether it was necessary to continue the defendant's restraints in order to maintain adequate courtroom security and concluded that it was.
Further, although the defendant invites us to make no distinction between the trial, whether by the court or by jury, and the pretrial proceedings, we decline to do so. In fact, the defendant was not shackled during his trial, the courtroom security considerations apparently having been resolved. Additionally, the defendant is unable to suggest any actual prejudice occurring to him as a result of his shackling during pretrial proceedings. In Boose, the supreme court identified three reasons to avoid shackling, where possible, at trial: (1) a tendency to prejudice the jury; (2) a restriction on the defendant's ability to assist counsel; (3) an affront to the dignity of the judicial process. (People v. Boose (1977), 66 Ill.2d 261, 265, 362 N.E.2d 303, 305.) In the instant case, during the pretrial proceedings, the court expressly ruled that it was not necessary for the defendants to be unshackled to take notes and that the dignity of the court was not offended. There was no jury.
Finally, we find this case to be similar to People v. Wilkes (1982), 108 Ill. App.3d 460, 438 N.E.2d 1385, in which the shackling of the defendant during his jury trial was upheld because he had previously attempted to escape while unshackled. In that case, the court observed that although the trial judge had articulated only one reason for the shackling, there was no indication that he was unaware of the others set forth in Boose. In the instant case, the defendant and his codefendants had previously demonstrated that they were disruptive in the courtroom. The court was faced with a realistic need for security in the courtroom during pretrial proceedings and was faced with an absence of reasonable alternatives.
 3 We turn now to the second issue raised by the defendant, namely, whether the court erred in refusing to consider the defense of necessity. In connection with this issue, the defendant argues that because *1004 there was some evidence to support the necessity defense, it was error for the court to refuse to consider it. Moreover, the defendant maintains that the court did not understand the law. In response, the State maintains that the trial judge properly refused to consider the necessity defense because the facts put forth by the defendant did not demonstrate that he was in imminent danger of bodily harm.
Conduct falls within the statutory definition of necessity "* * * if the accused was without blame in occasioning or developing the situation and reasonably believed such conduct was necessary to avoid a public or private injury greater than the injury which might reasonably result from his own conduct." (Ill. Rev. Stat. 1979, ch. 38, par. 7-13.) In the instant case, the defendant relies on People v. Unger (1977), 66 Ill.2d 333, 362 N.E.2d 319, to support his position. In Unger, the defendant, a resident at an honor farm, had been sexually assaulted by three inmates and received death threats as a result of having reported the assault to prison authorities. The defendant, charged with the crime of escape, said that he left the honor farm to save his life and planned to return after he had obtained help. In Unger, the court found the trial judge's refusal to instruct the jury on the defense of necessity to be error.
The defense of necessity may be described as involving a choice between two admitted evils. (People v. Krizka (1980), 92 Ill. App.3d 288, 290, 416 N.E.2d 36, 37.) In People v. White (1979), 78 Ill. App.3d 979, 981, 397 N.E.2d 1246, 1247, the defendant, an inmate at a community correctional center, failed to return to that center after an authorized absence because a friend had told him that his wife had been raped and his daughter beaten. In White, the court determined that it was proper for the trial judge to refuse to allow the defendant to testify as to his reasons for escape because the facts presented more than a choice between two evil courses; rather, the correctional center had a procedure for emergency leave which was not utilized by the defendant. In White, the presence of another alternative which would cause less harm, besides the two evil choices, meant that the defendant was not justified in breaking the law.
In the instant case, the facts which, according to the defendant, support the defense of necessity were the deplorable conditions which the prisoners had previously complained of, including bugs and vermin, broken windows, cold food, lack of access to the law library, and yard time and showers only once a week. According to the defendant, in order to place their plight before the warden, the inmates took over the unit on September 23, 1979, holding the guards captive, and made reasonable demands. The defendant argues that, given the gravity *1005 of the complaints, the court could have concluded that the takeover was necessary in order to avoid greater injury than the offense could reasonably be expected to cause.
The State responds that the facts in the instant case crucially differ from those in Unger because defendant Whitson was not in imminent danger of bodily harm and because the defendant had not demonstrated that he had exhausted all the available legal alternatives. Additionally, the State points out that the defendant's presence on a unit which provided fewer privileges than those provided to the general prison population was a result of the defendant's prior conduct and, thus, he was not without blame as to his present situation. Finally, the State argues that the defendant's conduct, participating in the inmate takeover of the unit, could well have resulted in greater injury than that which he was seeking to avoid, since the defendants were armed with homemade weapons.
We agree with the State on all counts and find that the trial court correctly refused to find that the defendant's actions fell within the defense of necessity.
 4 In addition to the two issues raised by the defendant with respect to his trial, the defendant also raises four issues regarding his sentencing. The first two sentencing issues raised by the defendant are: whether the trial court abused its discretion in denying his motion for discovery and for a continuance at his sentencing hearing and whether the trial judge considered improper evidence in sentencing the defendant to a maximum extended term of six years.
The parties agree that these identical issues were raised and decided by this court in People v. Whitson (1984), 120 Ill. App.3d ___ (Rule 23 order), which was a joint sentencing hearing with the one presently in question. In that case, this court affirmed the defendant's conviction but reversed and remanded the cause for a new sentencing hearing, ruling that the court's denial of the defendant's motion for a continuance constituted an abuse of discretion which denied the defendant a due opportunity for confrontation and cross-examination.
In that case, this court did not address the question of whether the trial court considered improper evidence in sentencing the defendant but denied the defendant's request that the cause be remanded for a new sentencing hearing before a different judge, presuming instead that the same trial judge will disregard all evidence except that which is competent and relevant to his determination on resentencing. See People v. Skidmore (1978), 56 Ill. App.3d 862, 372 N.E.2d 723, cert. denied (1978), 439 U.S. 912, 58 L.Ed.2d 258, 99 S.Ct. 282.
Finally, in this appeal, the defendant raises two additional issues *1006 pertaining to his sentence. First, the defendant contends that his sentence was impermissibly disparate from the sentences received by his codefendants because the aggravating factor used to justify his extended term also applied to his codefendants; however, he was the only one to receive an extended term. Specifically, the defendant points out that each of the five defendants who were tried together had been convicted of one or more felonies of a class greater than unlawful restraint within the preceding 10 years excluding time spent in custody. Second, the defendant contends that the trial court erred in imposing extended terms of imprisonment for his convictions for unlawful restraint because those offenses were not the most serious of which he was convicted.
We decline to address the disparate sentencing question because we remand for a new sentencing hearing and resentencing. We deem it appropriate, however, to consider the defendant's charge that his extended term for his unlawful restraint convictions were improper because unlawful restraint was not the most serious offense of which he was convicted and therefore these extended terms are in contravention of the applicable statutory provision. (Ill. Rev. Stat. 1979, ch. 38, par. 1005-8-2(a).) According to the defendant, because he was convicted of a more serious offense, aggravated battery, at his other trial, for which he received an extended term of 10 years, he could not properly be sentenced to an extended term in the instant case.
Although we note that a consolidated appeal pertaining to this statutory language is now pending before our supreme court (People v. Jordan, (1984), 103 Ill.2d 192), we do not find the question to be decided there to be determinative here. Instead, we agree with the State's argument that the fact that this defendant had a separate trial resulting in separate convictions arising out of distinct factual situations renders the statutory directive that a defendant may be sentenced to an extended term only for the "most serious" offense to be inapplicable here. There merely happened to be a joint sentencing hearing.
Accordingly, for all of the reasons stated above, the unlawful-restraint convictions of the defendant are hereby affirmed and the cause is reversed and remanded for a new sentencing hearing.
Affirmed in part, reversed in part, and remanded.
STOUDER and SCOTT, JJ., concur.
