
765 N.E.2d 508 (2002)
327 Ill. App.3d 1084
262 Ill.Dec. 371
In re JESSIE B., a Minor (The People of the State of Illinois, Petitioner-Appellee,
v.
Jessie B., Respondent-Appellant).
No. 3-00-0413.
Appellate Court of Illinois, Third District.
February 26, 2002.
*510 Justice HOMER delivered the opinion of the court:
The circuit court adjudged the minor, Jessie B., to be delinquent and placed him on one year's probation. The court later issued a nunc pro tunc order extending the probation to five years. The State filed a petition to revoke probation, which the trial court granted. On appeal, the State argues that the case is moot because Jessie has already been released from the Department of Corrections, Juvenile Division (DOCJD). Jessie contends that (1) the case is not moot because he faces collateral legal consequences from the revocation of his probation, (2) the trial court lacked jurisdiction over him when it granted the State's petition to revoke his probation, and (3) the State failed to prove by a preponderance of the evidence that Jessie violated a condition of his probation. We hold that the case is not moot and affirm.

BACKGROUND
On September 3, 1997, the State petitioned the circuit court to adjudge the minor, Jessie B., to be a ward of the court because of his delinquency. Jessie's birth date is August 24, 1981. The petition alleged that he had committed residential burglary (720 ILCS 5/19-3 (West 1996)) and theft of services (720 ILCS 5/16-3(a) (West 1996)) on May 25, 1997. The petition also alleged that he committed disorderly conduct (720 ILCS 5/26-1(a)(1) (West 1996)) by fondling himself in plain view of a female neighbor on September 1, 1997.
On September 12, 1997, the minor stipulated to having committed residential burglary and theft of services, but denied the disorderly conduct charge. The State dismissed the disorderly conduct allegation. The court adjudged Jessie to be delinquent.
On October 31, 1997, the court placed Jessie on one year's probation with the condition that he "comply with and successfully complete the residential program at Onarga Academy," a treatment facility for youths with sexual behavioral and psychological problems. On October 16, 1998, the State petitioned the court to revoke Jessie's probation because the minor had failed to meet treatment goals at Onarga.
Following a February 4, 1999, hearing on the petition to revoke, the court did not determine whether Jessie had violated his probation. Instead, by agreement of the parties, the court issued an amended probation order extending Jessie's probation until August 4, 1999, to allow him to work toward successful completion of the Onarga program. This amended order stated that "all prior conditions of Probation shall continue." At a June 25, 1999, status hearing, the parties agreed to continue the case until August 19, 1999.
At a status hearing on August 19, 1999, the State moved for leave to file a second petition to revoke Jessie's probation based on new information from Onarga. The court granted the State's motion and the State filed its second petition to revoke. In this petition, the State alleged that Jessie had "failed to successfully complete the first of the three phase treatment plan during his twenty month placement at Onarga Academy."
On September 1, 1999, Jessie filed a motion to dismiss the State's petition to revoke. In this motion, Jessie argued that his probation ended on August 4, 1999, and the State's petition to revoke was not filed until August 19, 1999. Jessie contended that because the State's petition was filed after his probation ended, the court did not have jurisdiction over him to consider the petition.
In its response, the State argued that the court's original October 31, 1997, probation order of one year's probation was *511 invalid. The State submitted that by statute, the commission of a forcible felony by a juvenile, such as residential burglary, required a probationary period of five years. See 720 ILCS 5/2-8 (West 1996); 705 ILCS 405/5-24 (West 1996).[1]
On December 2, 1999, the court denied Jessie's motion to dismiss the petition to revoke. The court ruled that the original probation order was void and set Jessie's probation at five years, nunc pro tunc. On December 8, 1999, the court again amended the probation order to reflect that Jessie was now on probation for five years and continued all prior conditions of probation.
On January 21, 2000, the court held a hearing on the State's second petition to revoke. The testimony at the hearing indicated that the Onarga treatment program was in three phases. The average stay at Onarga to complete the three phases was a year and a half. The average period to complete the first phase was 6 to 10 months. Jessie had been at Onarga for 26 months and had not completed phase one because of his noncompliant behavior. Although Jessie had made progress toward the completion of phase one during the two months immediately prior to the hearing, witnesses estimated that he was 6 to 10 months from completion of the full program.
At the end of the hearing, the judge noted that Jessie had not completed the first phase of the three-phase program. She noted that he had taken far longer than originally projected to complete the program. She stated that it did not appear that Jessie could complete the program within the near future. The judge found that the State had proven by a preponderance of the evidence that Jessie had failed to even come close to substantial or successful completion of the program. The court granted the State's petition and revoked Jessie's probation.
At the February 18, 2000, dispositional hearing, the court ordered Jessie to be committed to an indeterminate term of incarceration with the DOCJD. Jessie appeals from this final judgment.
The record includes a document from the DOCJD filed with the court on May 23, 2000, entitled "Notice of Statutory Release/Discharge from Juvenile Division." This document states that Jessie was to be released from the DOCJD on August 24, 2000, his nineteenth birthday.

ANALYSIS

I. Mootness
Initially, the State argues that Jessie's appeal is moot because his wardship was terminated on August 24, 2000, when he turned 19 and was released from the DOCJD. The test for mootness is whether the issues involved in the circuit court no longer exist because intervening events have rendered it impossible for the appellate court to grant the complaining party effectual relief. Pierce Downer's Heritage Alliance v. Village of Downers Grove, 302 Ill.App.3d 286, 235 Ill.Dec. 325, 704 N.E.2d 898 (1998). An exception to the mootness doctrine exists, however, where there are collateral legal consequences which survive the expiration of the order under review. People v. Halasz, 244 Ill.App.3d 284, 185 Ill.Dec. 177, 614 N.E.2d 311 (1993).
In the present case, there are collateral legal consequences which survive Jessie's discharge. For example, if Jessie were to be convicted of a crime as an adult in the future, his sentence may be affected by his history of prior delinquency as a factor in aggravation. See 730 ILCS 5/5-5-3.2(a)(3) (West 2000); In re W.C., 167 Ill.2d 307, 212 Ill.Dec. 563, 657 N.E.2d 908 *512 (1995). Under the collateral legal consequences exception to the mootness doctrine, this case is not moot.

II. The Circuit Court's Jurisdiction
Jessie argues that his probation ended on August 4, 1999, and, therefore, the court lacked jurisdiction over him to consider the State's second petition to revoke, filed on August 19, 1999. He contends that the circuit court lacked authority to change his term of probation from one year to five years, nunc pro tunc, thereby retaining jurisdiction over him as of August 19, 1999.
The State submits that even if the trial judge improperly changed Jessie's term of probation, nunc pro tunc, the State's original October 16, 1998, petition to revoke was still pending before the court on August 19, 1999. The State argues that the pendency of its first petition to revoke gave the court jurisdiction over the minor when the State submitted its second petition to revoke.
A nunc pro tunc order is designed to allow the record to reflect that which was already done previously, but which was omitted from the record. People v. Adams, 144 Ill.2d 381, 163 Ill.Dec. 483, 581 N.E.2d 637 (1991). A nunc pro tunc order may be entered to correct clerical errors, or inadvertent scrivener's errors, but such an order cannot be used to correct judicial errors. Schaffner v. 514 West Grant Place Condominium Ass'n, 324 Ill.App.3d 1033, 258 Ill.Dec. 580, 756 N.E.2d 854 (2001). A court may not use a nunc pro tunc order to correct judicial errors that are the result of deliberate but erroneous judicial reasoning. Gounaris v. City of Chicago, 321 Ill.App.3d 487, 254 Ill.Dec. 613, 747 N.E.2d 1025 (2001).
In the present case, the trial court entered a nunc pro tunc order to correct the judicial error of an incorrect term of probation as the result of deliberate but erroneous judicial reasoning. This error was not the result of a clerical or scrivener's error. Thus, the circuit court improperly used a nunc pro tunc order to change Jessie's probation from one year to five years.
Nevertheless, an appellate court may affirm the trial court's ruling on any basis supported by the record. American Multi-Cinema, Inc. v. City of Warrenville, 321 Ill.App.3d 349, 255 Ill.Dec. 42, 748 N.E.2d 746 (2001). The filing of a petition to revoke probation tolls the period of probation until the final determination of whether the minor violated a condition of probation, and the term of probation does not run until the hearing and disposition of the petition. 705 ILCS 405/5-720(1) (West 2000).
In this case, the State filed its first petition to revoke on October 16, 1998, tolling Jessie's period of probation until a final determination of whether he violated a condition of his probation. On August 19, 1999, the court had not ruled on the disposition of that petition. Jessie's term of probation was tolled by the filing of the State's first petition to revoke. Therefore, the circuit court had jurisdiction over Jessie on August 19, 1999, to accept the State's second petition to revoke.

III. Violation of a Condition of Probation
Jessie argues that the court erred in revoking his probation by finding by a preponderance of the evidence that he had violated a condition of his probation. He contends that the State proved only that he had failed to complete the first phase of a three-phase program. Jessie submits that the probation order only required him to work toward successful completion of treatment, not to successfully complete one specific phase of that treatment.
The State argues that the conditions of the original probation order were continued *513 in each of the subsequent amended probation orders. The State contends that Jessie's probation was conditioned upon his complying with and successfully completing the Onarga program. According to the State, the evidence was overwhelming that he violated that condition of his probation.
At the hearing on a petition charging a violation of a condition of probation, the State must prove the violation by a preponderance of the evidence. 705 ILCS 405/5-720(3) (West 2000). An appellate court will not disturb the trial court's ruling to terminate probation unless the trial court's determination was against the manifest weight of the evidence. People v. Bell, 219 Ill.App.3d 264, 162 Ill.Dec. 340, 579 N.E.2d 1154 (1991).
In this case, the condition of Jessie's probation at issue was whether he had complied with and successfully completed the Onarga treatment program. This was a condition of Jessie's probation as stated in the original probation order and in each of the subsequent amended orders. The State produced ample evidence that Jessie failed to comply with and successfully complete even the first phase of the three-phase program of treatment. Therefore, we hold that it was not against the manifest weight of the evidence for the trial court to revoke Jessie's probation.

CONCLUSION
For the foregoing reasons, we affirm the judgment of the circuit court of the McDonough County.
Affirmed.
LYTTON, P.J., and McDADE, J., concurred.
NOTES
[1]  Section 5-24 was subsequently repealed by Public Act 90-590. (Pub. Act 90-590, eff. January 1, 1999 (repealing 705 ILCS 405/5-1 through 5-34 (West 1996))).
