
107 Ill. App.3d 226 (1982)
437 N.E.2d 712
CARLO RAIMONDO, Petitioner-Appellant,
v.
IVAN PAVKOVIC, M.D., et al., Respondents-Appellees.
No. 81-1082.
Illinois Appellate Court  First District (2nd Division).
Opinion filed June 1, 1982.
Rehearing denied July 27, 1982.
Mark J. Heyrman, of Chicago, for appellant.
Richard M. Daley, State's Attorney, of Chicago (Michael E. Shabat, Kevin Sweeney, and Gregory J. Ellis, Assistant State's Attorneys, of counsel), for appellees.
Reversed and remanded.
JUSTICE DOWNING delivered the opinion of the court:
Petitioner Carlo Raimondo (Raimondo) sought a writ of habeas corpus (Ill. Rev. Stat. 1979, ch. 65, par. 1 et seq.) ordering his release from *227 the custody of the Illinois Department of Mental Health and Developmental Disabilities (the Department). The Department has maintained custody of Raimondo since 1975 pursuant to a criminal court order which committed him following a finding he was not guilty by reason of insanity (Ill. Rev. Stat. 1975, ch. 38, pars. 6-2, 1005-2-4) of certain crimes with which he had been charged. The circuit court denied the requested relief and set a date for the expiration of Raimondo's commitment to the Department.
Raimondo appeals, claiming the circuit court erred (1) in failing to address the merits of his petition for a writ of habeas corpus; (2) in denying his motion for a default judgment on the habeas corpus petition; (3) in applying the then-effective provisions of the Unified Code of Corrections (UCC) (Ill. Rev. Stat. 1979, 1980 Supp., par. 1001-1-1 et seq.) which concerned dispositions upon findings of not guilty by reason of insanity; and (4) in calculating the expiration date of his commitment, assuming the applicability of those provisions. Raimondo has also filed a motion to strike an argument contained in the appellee's brief, which we have taken with the case.
Raimondo was arrested on April 1, 1973, charged with the commission of rape and armed robbery on March 29, 1973, and with an unrelated armed robbery on January 21, 1973. After trial for these crimes, the criminal trial court found that Raimondo was not guilty by reason of his insanity at the time the crimes were carried out. The criminal trial court also found that this insanity continued as of that dispositional date, January 9, 1975. Consequently, pursuant to the then-effective provisions of the UCC (Ill. Rev. Stat. 1975, ch. 38, par. 1005-2-4(b)), the criminal court committed Raimondo to the Department "until he shall have permanently recovered from his insanity." We note that under that statute, this initial commitment order (the "criminal commitment") covered a period not to exceed 12 months from the date of its entry. At the end of this 12-month period, Raimondo's commitment (the "civil commitment") was governed by the provisions of the then-effective Mental Health Code of 1967 (the MHC) (Ill. Rev. Stat. 1975, ch. 91 1/2, par. 1-1 et seq.). Thus, Raimondo was in custody under a civil commitment as of January 9, 1976.
During Raimondo's continuing civil commitment, the legislature altered both relevant statutes. The relevant UCC provision was first amended effective August 1, 1977, by Public Act 80-164. (See 1977 Ill. Laws 803-06.) Briefly, the new statute provided that, when an offender was found not guilty by reason of insanity and was still in need of mental treatment, the court must order "criminal" commitment of the offender to the Department. This criminal commitment was to be for an indefinite period not to exceed the maximum length of time which the offender could have served had he been convicted of the most serious offense *228 charged, less credit for good time behavior, before becoming eligible for parole. Ill. Rev. Stat. 1977, ch. 38, pars. 1005-2-4(a), (b).
The MHC was repealed and replaced by the Mental Health and Developmental Disabilities Code (the MHDDC) effective January 1, 1979, by Public Act 80-1414. See 1978 Ill. Laws 1462; Ill. Rev. Stat. 1979, ch. 91 1/2, par. 1-100 et seq.
The UCC was amended again, effective September 19, 1980, by Public Act 81-1497. (See 1980 Ill. Laws 2530-35.) Briefly, this amendment required the Department to evaluate an offender found not guilty by reason of insanity. The court then held a hearing to determine which of four classifications the offender then came within. If the offender was found to fall within the "subject to involuntary admission" classification, as defined, he was to be committed to the Department for an indefinite period calculated as under the previous version of the UCC. Ill. Rev. Stat., 1980 Supp., ch. 38, pars. 1005-2-4(a), (b).
On January 13, 1981, Raimondo filed the present petition against respondents, who are employees of the Department, seeking a writ of habeas corpus ordering his release from the custody of the Department. This petition alleged Raimondo was being unlawfully detained and restrained of his liberty by respondents. The petition further alleged that Raimondo's lawful period of confinement had expired under any version of the UCC which might be applied.
A hearing was held before the circuit court on January 29, 1981. The circuit court ruled the most recent version of the UCC applied, and continued the case so that an evaluation of Raimondo's condition could be made. The court ruled the burden would be on the State to prove Raimondo was still in need of commitment.
At the next court appearance, February 26, 1981, Raimondo filed a motion for default judgment against respondents for their alleged failure to properly file a return as required by the provisions of the Illinois habeas corpus statute (Ill. Rev. Stat. 1979, ch. 65, par. 12). The circuit court continued the motion.
On March 12, 1981, the respondents filed a motion to dismiss Raimondo's petition, asserting Raimondo's circumstance did not fall within those for which a writ of habeas corpus was proper (see Ill. Rev. Stat. 1979, ch. 65, par. 22), and that he should have filed a petition for discharge under the UCC (Ill. Rev. Stat., 1980 Supp., par. 1005-2-4(e)). The circuit court denied the motion for default and continued the motion to dismiss.
At the next hearing held March 20, 1981, the circuit court ruled the petition for writ of habeas corpus was the improper procedure because Raimondo had not exhausted his "administrative remedies." The court denied the petition, but stated it would treat the petition as one for discharge *229 under the UCC. The court ruled that the most recent version of the UCC should be applicable. Since that provision set a criminal commitment period based upon the maximum sentence which could have been entered upon conviction of the most serious crime which led to the not-guilty-by-reason-of-insanity verdict, and since Raimondo had never been given such a maximum sentence at the time of the initial criminal commitment, the court set the matter for a sentencing hearing.
That sentencing hearing took place on April 9, 1981. The State called a single witness in aggravation, and Raimondo called three witnesses in mitigation. The court then sentenced Raimondo hypothetically to serve 100 to 300 years for the rape and armed robbery committed March 29, 1973, and 50 to 100 years for the armed robbery committed January 21, 1973. These sentences were to run consecutively. The court then proceeded to calculate the maximum possible period of criminal confinement of Raimondo to the Department in light of these sentences. The court determined that period would expire no later than November 12, 1986. Raimondo appeals.

I
Raimondo contends the circuit court erred in ruling that his petition for a writ of habeas corpus was not the proper method for seeking his release from the custody of the Department.
 1 The Illinois habeas corpus act provides a prisoner in custody by virtue of process from a court may be discharged for, among other reasons, the occurrence of some act, omission, or event subsequent to the initial lawful imprisonment which entitles the prisoner to discharge. (Ill. Rev. Stat. 1979, ch. 65, par. 22(2).) Neither the UCC (Ill. Rev. Stat., 1980 Supp., ch. 38, par. 1005-2-4(j)), nor the MHDDC (Ill. Rev. Stat. 1979, ch. 91 1/2, par. 3-905), precludes the availability of the writ in these circumstances. In his petition, Raimondo alleged his period of lawful confinement with the Department had expired. This allegation, if proved, is a basis for relief under the noted section of the habeas corpus act. The circuit court therefore erred in ruling that Raimondo's petition was improper in these circumstances.
Nevertheless, this error alone does not require reversal since the record makes clear the circuit court did rule on the merits of the substantive relief sought by Raimondo, his release from custody. The validity of the court's denial of that relief is discussed below.

II
Raimondo asserts the circuit court erred in failing to grant his motion for default judgment based upon respondents' alleged failure to properly respond to the habeas petition.
*230 The record indicates respondents did indeed fail to comply with the return requirements of the habeas corpus act. (Ill. Rev. Stat. 1979, ch. 65, pars. 6, 12.) Raimondo filed a motion for default judgment pursuant to section 50(4) of the Civil Practice Act (Ill. Rev. Stat. 1979, ch. 110, par. 50(4)), which governs habeas corpus proceedings. Ill. Rev. Stat. 1979, ch. 65, par. 32.
 2, 3 It is a fundamental principle in Illinois law that a default judgment is not encouraged, but is employed only as a last resort. (See Jones v. Sullivan (1976), 34 Ill. App.3d 786, 789, 340 N.E.2d 323.) This principle is especially applicable in the quasi-criminal proceedings of this case, where procedural rules are from civil practice but where the outcome has ramifications in criminal law. Thus, while respondents' failure to comply with the requirements of the habeas corpus act is not condoned, no reversible error resulted from the circuit court's denial of Raimondo's motion for default.

III
In the central issue of this appeal, Raimondo claims the circuit court erred in applying the provisions of the then-effective version of the UCC and thereby extending the expiration date of his criminal commitment, in violation of the principles of statutory construction and the ex post facto clauses of the Federal and State constitutions. U.S. Const., art. I, sec. 10; Ill. Const. 1970, art. 1, sec. 16.

A.
In order to lend clarity to the confusing but nonetheless crucial chronology of this case, we repeat it here in summary form.


    4/1/73   Raimondo arrested
    1/9/75   Raimondo found not guilty by reason of insanity;
             criminal commitment to Department (for statutory
             period not to exceed 12 months), followed by civil
             commitment governed by provisions of the MHC
    1/9/76   Criminal commitment expires; civil commitment under
             MHC provisions commences
    8/1/77   UCC amended; new provisions lengthen possible criminal
             commitment
    1/1/79   MHC repealed; replaced by MHDDC
   9/18/80   Second amendment of UCC
   1/13/81   Raimondo filed petition for writ of habeas corpus
    4/9/81   Circuit court extends Raimondo's "criminal" commitment
             to 11/12/86



*231 B.
Our examination of this chronology in conjunction with relevant legal principles convinces us the circuit court's disposition of this matter was erroneous.
As noted, when the criminal trial court ordered Raimondo's criminal commitment to the Department in 1975, the relevant terms of the UCC then in effect provided such criminal commitments were to be for a period "not to exceed 12 months." (Ill. Rev. Stat. 1975, ch. 38, par. 1005-2-4(b).) After the passage of this 12-month period of criminal commitment, the "detention, care, treatment, and discharge" of the offender was to be governed by the MHC. Consequently, when Raimondo's period of criminal commitment expired on January 9, 1976, he was thereafter held by the Department under civil commitment pursuant to the MHC. The provisions of the UCC then in effect were no longer relevant to Raimondo's commitment as of that date, since the UCC specifically made the MHC controlling. The potential for the discharge of Raimondo from such civil commitment thus was governed solely by article X of the MHC (Ill. Rev. Stat. 1975, ch. 91 1/2, par. 10-1 et seq.), so long as that statute was in effect.
However, when the MHDDC superseded the MHC on January 1, 1979, this situation changed. The MHDDC explicitly provides that a person committed to the Department pursuant to the UCC may be released "only as provided in the [UCC], as now or hereafter amended." (Ill. Rev. Stat. 1979, ch. 91 1/2, par. 3-200.) (The obvious rationale for this requirement is to allow the criminal courts to maintain supervision of the disposition of persons who are in the custody of the Department as a result of their commission of criminal acts, albeit while suffering from insanity.) Since Raimondo had not sought or otherwise been granted his discharge from the Department in the manner provided by the MHC prior to the repeal of the statute, he was lawfully in the Department's custody when the MHDDC took effect on January 1, 1979, and thus became subject to its dispositional provisions, including section 3-200. (See generally Ill. Rev. Stat. 1979, ch. 91 1/2, par. 6-104.) And, as noted, section 3-200 made the provisions of the UCC controlling upon the issue of Raimondo's potential discharge.
 4 Among the provisions of the UCC which at first blush might seem controlling through the application of section 3-200 of the MHDDC is the "initial commitment order" clause of section 5-2-4(b) (Ill. Rev. Stat., 1980 Supp., ch. 38, par. 1005-2-4(b)).[1] Yet, in this particular set of *232 facts, Raimondo had already served that which we have referred to as the criminal commitment period, which period would be entered under the "initial commitment order" clause of section 5-2-4(b). Of course, Raimondo's criminal commitment period had been entered under the earlier version of the UCC. Nevertheless, as of the date the UCC became relevant to Raimondo's status (January 1, 1979), Raimondo was serving a civil commitment. Thus, the circuit court erred in attempting to establish a new criminal commitment period for Raimondo pursuant to the "initial commitment order" clause of section 5-2-4(b). While the remainder of that section was applicable, that particular clause could have no impact on Raimondo's status.
Acceptance of a contrary interpretation would lead to a violation of the ex post facto clauses of the State and Federal constitutions. In order to remain faithful to those clauses, the legislature could not enact a statute which would institute a new period of criminal commitment for a person in Raimondo's situation simply by amending the UCC to provide for longer criminal commitment periods and by making such amendment of retroactive impact. Nor can the court accomplish this result by making retroactive application of a statute which is clearly constitutional when applied prospectively only. As concerns this case, regardless of the changes in the statutes which govern Raimondo's civil commitment and the potential discharge therefrom, those amendments cannot be utilized to again subject Raimondo to criminal commitment based upon the same acts which supported the expired 1975 criminal commitment. (See Weaver v. Graham (1981), 450 U.S. 24, 28-31, 67 L.Ed.2d 17, 22-24, 101 S.Ct. 960, 963-66; Lindsey v. Washington (1937), 301 U.S. 397, 401, 81 L.Ed. 1182, 1185-86, 57 S.Ct. 797, 799; Harris v. Irving (1980), 90 Ill. App.3d 56, 59-60, 412 N.E.2d 976, appeal denied (1981), 82 Ill.2d 584; People v. Peach (1976), 39 Ill. App.3d 757, 759, 350 N.E.2d 583.) The circuit court erred in doing so in this case.
Respondents, represented by the State's Attorney of Cook County, argue that retroactive application of the "initial commitment order" amendments to section 5-2-4(b) of the UCC can be made, and that our supreme court has approved just such an action in People v. Valdez (1980), 79 Ill.2d 74, 402 N.E.2d 187. This argument is wholly meritless. The supreme court's upholding of the application of the UCC amendments in Valdez was clearly because Valdez' acquittal by reason of insanity occurred after the effective date of those amendments. Here, in contrast, Raimondo's acquittal occurred long prior to the effective date of the amendments.
The State's Attorney also claims the changes contained in the UCC amendments were procedural rather than substantive, so that ex post *233 facto considerations are not relevant. We do not agree. See People v. Tennyson (1979), 75 Ill. App.3d 341, 346, 394 N.E.2d 418.
In sum, then, the only provisions of the amended UCC relevant here are those which pertain to the methods through which a discharge from civil commitment which follows a criminal commitment can be procured. The "sentencing hearing" held by the circuit court had no basis in the UCC and was of no consequence to Raimondo's status. The court order which effectively reinstated Raimondo's criminal commitment was erroneously entered and is reversed. The case must be remanded for such further proceedings under the UCC (through the MHDDC) which might be held while adhering to the conclusions we have made in this opinion.
In order to provide some guidance for what may follow upon remand, we point out several avenues which the parties may choose to pursue to determine whether Raimondo should continue to remain in the custody of the Department under civil commitment. First, the Department could issue a determination that Raimondo is no longer subject to involuntary admission and may be discharged. (Ill. Rev. Stat., 1980 Supp., ch. 38, par. 1005-2-4(d).) Second, Raimondo could file a petition for discharge under the UCC. (Ill. Rev. Stat., 1980 Supp., ch. 38, par. 1005-2-4(e).) In either case, an evidentiary hearing must be held, with the burden of proof assigned in regard to whichever party commenced the proceeding. (See Ill. Rev. Stat., 1980 Supp., ch. 38, par. 1005-2-4(g).) Third, Raimondo could pursue the merits of his habeas corpus petition, in light of our findings in section I above. However, we initially perceive that the evidentiary requirements for proof of entitlement to discharge under this theory would equate with those necessary were a petition for discharge to be filed under the UCC, given our earlier discussion. In any event, at this juncture we make only suggestions. Our substantive conclusion on the central issue of this appeal is that Raimondo currently remains in the custody of the Department under a valid civil commitment until such time as evidence is presented which would entitle him to discharge under the terms of the UCC.[2]

IV
In light of the above findings, it is unnecessary for us to rule upon the merits of Raimondo's motion to strike an argument contained in respondents' *234 appellees' brief. That argument concerns the correctness of the date set by the circuit court for the expiration of Raimondo's renewed criminal commitment. Since the court erred in attempting to set any such date, the argument is of no relevance to our disposition of the appeal. We do note, however, that this argument was made by the State's Attorney without the filing of a cross-appeal. Were the argument relevant to the merits of the appeal, it would have been stricken as improperly made.
For the reasons set forth herein, the judgment of the circuit court of Cook County is reversed and the cause is remanded for such action as may be appropriate pursuant to the provisions of this opinion.
Reversed and remanded.
STAMOS, P.J., and HARTMAN, J., concur.
NOTES
[1]  The "initial commitment order" clause provides for an initial order admission (commitment) of a person found not guilty by reason of insanity who remains subject to involuntary admission at the time of disposition. That initial admission is set at an indefinite length not to exceed the maximum sentence possible for the most serious underlying offense, less good time credit, before eligibility for parole. See Ill. Rev. Stat., 1980 Supp., ch. 38, par. 1005-2-4(b).
[2]  We reject Raimondo's argument that he is entitled to immediate discharge because his lawful civil commitment expired on March 1, 1979, when the Department allegedly failed to comply with the requirements of section 3-813(a) of the MHDDC. (Ill. Rev. Stat. 1979, ch. 91 1/2, par. 3-813(a).) In light of the directive of section 3-200, which we discussed, the procedures set forth in section 3-813(a) have been superseded by those of the UCC and are inapplicable to this type of case.
