
934 N.E.2d 611 (2010)
The PEOPLE of the State of Illinois, Plaintiff-Appellee,
v.
James A. GIBSON, Defendant-Appellant.
No. 2-08-0738.
Appellate Court of Illinois, Second District.
August 19, 2010.
*613 Thomas A. Lilien, Deputy Defender, Vicki P. Kouros (Court-appointed), Office of the State Appellate Defender, Elgin, for James A. Gibson.
Joseph E. Birkett, DuPage County State's Attorney, Lisa Anne Hoffman, Assistant State's Attorney, Wheaton, Lawrence M. Bauer, Deputy Director, Joan M. Kripke, State's Attorneys Appellate Prosecutor, Elgin, for the People.
Justice McLAREN delivered the opinion of the court:
After a jury trial, defendant, James A. Gibson, was convicted of armed robbery (720 ILCS 5/18-2(a)(2) (2006)), aggravated kidnapping (720 ILCS 5/10-2(a)(6) (West 2006)), and unlawful possession of a weapon by a felon (720 ILCS 5/24-1.1(a) (West 2006)). The trial court sentenced defendant to concurrent prison terms of 12 years, 27 years, and 12 years, for each offense, respectively. Defendant appeals his convictions and seeks modification of his sentence for aggravated kidnapping and correction of the mittimus to show an additional day of credit for time served before sentencing. We affirm as modified in part, reverse in part, and remand for resentencing.

I. ISSUES
Initially, the State argues that we have no jurisdiction to hear this appeal. Defendant argues that we have jurisdiction, and he argues on the merits that: (1) "[w]here the State failed to establish that either of his two codefendants was a convicted felon, the State failed to prove the defendant guilty beyond a reasonable doubt of unlawful possession of a weapon by a felon under an accountability theory"; (2) "[w]here the defendant's testimony that he participated in the crimes to avert harm to his family constituted, at the very least, `some evidence' to support his affirmative defense, the trial court erred in refusing to instruct the jury on the defense of necessity"; (3) "[t]he defendant's sentence for aggravated kidnapping violated the proportionate penalties clause of the Illinois Constitution because the sentencing range for aggravated kidnapping is greater than the sentencing range of an offense with identical elements, namely armed violence predicated on kidnapping"; and (4) "[t]he defendant is entitled to an additional day of credit for the time he served in custody before sentencing."

II. FACTS
At trial, Said Saley testified that on July 6, 2006, he was a deliveryman for Spirit *614 Delivery in Melrose Park, Illinois. That day he and his helper, Robert Salgado, drove a white wide-box truck loaded with televisions to an address on Montrose Avenue in Wood Dale, Illinois. When Saley walked back to the truck after their first delivery, "a big guy," whom Saley identified in court as codefendant Melvin Wilson, put his arm around Saley's neck and put a gun to Saley's back. A "short guy," whom Saley identified as codefendant Caesar Moore, threatened Salgado. Wilson told Saley to open the back of the truck and ordered Saley to get inside. Saley complied and Wilson got in the back of the truck with him. Saley heard Moore try to start the truck but he could not do it. Saley was ordered to drive the truck while Wilson and Moore sat next to him. Both Wilson and Moore had guns. Saley saw defendant outside a van parked next to the truck. Salgado was taken to the van. The van, driven by defendant, followed the truck.
Saley also testified that the truck was pulled over by police at Butterfield Road and Route 83. The van passed the truck. The police told Saley to drive to a weigh station. Wilson and Moore ordered Saley not to follow the police to the weigh station but, instead, to keep driving. Saley drove to a gas station. Wilson took Saley's wallet, money, and phone. Moore threw Saley's phone on the street. Wilson called defendant and gave him directions. Saley eventually saw the van and followed it. Salgado was no longer inside the van. When the van missed a ramp on the expressway, Wilson screamed at defendant on the phone. Saley caught up with the van again. Moore and Wilson let Saley out of the truck at Addison and the Kennedy Expressway; Wilson hit Saley on the head with his gun.
Defendant testified that he was 38 years old, had a prior felony conviction of armed robbery and made his living as a contractor and had a moving business. The day before the alleged offenses, Wilson asked defendant for help with a moving job and defendant agreed; Wilson did not say anything about a robbery. The next day, Wilson and Moore, whom defendant did not know, picked up defendant at defendant's home in a van. Defendant had his cell phone with him. Wilson asked defendant to drive. Defendant did not know where he was driving, but he followed Moore's directions to a warehouse and parked in a lot across the street. Moore got out of the van "and for two hours was back and forth until the individual arrived that he was supposed to meet." Moore came to the van and told him that he should follow a truck driven by a Palestinian man and that a Mexican laborer would be helping.
Defendant testified that, about 20 minutes after they left the warehouse, Wilson told defendant "this is not a moving job. This is an armed robbery and I didn't tell you because I knew if I told you, you wouldn't have come." Defendant continued to follow the truck for another 20 to 30 minutes. They reached a cul-de-sac in a residential area and parked. Defendant did not ask to stop the van during the drive, because Wilson had pulled out a white plastic bag with a gun inside. During the drive, defendant was worried and did what Wilson and Moore told him to do to protect himself and his family, particularly since Wilson knew where defendant lived. On cross-examination, defendant testified that the truck turned at some point while he was following it, and he could have turned in the opposite direction but he did not. Defendant also testified that he did not use his cell phone to call 911 or his wife and did not let Salgado use his cell phone to call the police.
*615 Defendant testified that he parked next to the truck and that Wilson took the keys from the van. Wilson and Moore got out of the van. Defendant was alone in the van. Wilson and Moore had guns. Defendant did not have a gun. Defendant was nervous and he smoked marijuana. He thought about running away, but he was worried that he would get shot so he stayed in the van. Defendant testified on cross-examination that, while he was alone in the van, he could have opened the van door and run away or called 911, the police, or his wife.
Defendant also testified that he saw Wilson take Saley to the back of the truck. Moore tried to do the same thing with Salgado, but Salgado refused to get into the truck so Moore put Salgado in the van defendant was driving. Moore went back to the truck but he could not start it, so Saley was brought to the truck to drive it. Moore came back to the van and told defendant to follow them and said, "don't make us come looking for you." Moore had a gun in his hand. Defendant felt threatened and feared for his family. Wilson then gave defendant the keys to the van and Wilson got into the truck.
Defendant testified that he followed the truck onto Route 83. A state trooper pulled over the truck but not the van. Defendant continued to drive. He tried to calm Salgado down. He asked Salgado where he wanted to get off and dropped him off near an accident scene. Defendant was afraid so he headed back to his home in Chicago. On his way home, Wilson called defendant and told him that Wilson and Moore got away from the trooper. Wilson told defendant to wait for them at Canal Street and said, "don't make me come ... you better be there." Defendant waited for them because he did not want them to go to his house, where he had a 16-month-old baby. On cross-examination, defendant also testified that God answered his prayers when the police stopped the truck. Defendant testified that he could have stopped the van and walked up to the police and asked for help. Defendant testified that he "thought about it." Defendant also testified that he saw police when he let Salgado out of the van at the accident site. Defendant testified that he could have spoken with those police officers but did not. Defendant testified that he did not talk to the police because he was an "an ex-felon on parole and they would assume I had something to do with it. That's why I continued to drive."
Defendant testified that 45 minutes after he dropped off Salgado, Moore called him and told him to where to meet Moore and Wilson. Defendant met them in Chicago and Wilson got into the van with him. Wilson told him that he was going to help them unload the televisions. Wilson sat next to defendant and pulled up his shirt to show defendant a gun. At some point, Saley was released. Defendant then followed Moore to his house. Defendant put the televisions in Moore's garage because he did not want to get shot. Moore drove the truck to Gurnee Mills Mall and Wilson and defendant followed in the van. They left the truck at the mall. On cross-examination, defendant testified that, "at the time I was driving [Moore's van], I thought he was going to jail." Defendant testified that, when they returned to Moore's house, he and Moore smoked marijuana. Defendant did not get any money. Defendant moved a television into Moore's house for his wife. Defendant was on his way from Moore's house to a liquor store when he was arrested by police.
Defendant testified that he was forced to help Wilson and Moore. He was concerned that he would get shot or that they would retaliate and hurt his family. Defendant *616 wanted to protect himself and his family. He told police about Moore's threats, but he did not include them in his written statement. On cross-examination, defendant testified that he did not know whether the guns were loaded. Moore never told defendant, "I'm going to come looking for you and beat you up." Moore never said, "I'm going to blow your brains out." Moore never said, "I'm going to come look for you and then go inside the house and do something bad to your family."

III. ANALYSIS

A. Jurisdiction
Initially, we address the State's argument that this court lacks jurisdiction to address defendant's appeal.
The relevant facts are the following. Defendant filed a motion in this court to establish jurisdiction and for leave to file an amended notice of appeal. The State did not object to defendant's motion. In defendant's motion, he conceded that his motion to reconsider his sentence was not timely filed. Defendant asked this court to declare that it had jurisdiction over this cause because the trial court had been revested with jurisdiction to hear his motion to reconsider. Defendant argued that revestment was proper because, during the hearing before the trial court on the motion to reconsider his sentence, the State failed to object to the untimeliness of the filing of the motion. Instead, the State argued against defendant's motion on the merits.
On December 1, 2008, this court granted defendant's motion and determined that we had jurisdiction to consider defendant's appeal, based on the revestment doctrine. On March 1, 2010, the State filed a motion to dismiss this appeal. Defendant filed an objection to the State's motion. This court ordered that the State's motion and defendant's objection be taken with the case.
Supreme Court Rule 606(b) provides: "Except as provided in Rule 604(d), the notice of appeal must be filed with the clerk of the circuit court within 30 days after the entry of the final judgment appealed from or if a motion directed against the judgment is timely filed, within 30 days after the entry of the order disposing of the motion." 210 Ill.2d R. 606(b). Thus, ordinarily, a trial court loses jurisdiction over a matter 30 days after entry of final judgment, unless a timely postjudgment motion is filed. People v. Flowers, 208 Ill.2d 291, 303, 280 Ill.Dec. 653, 802 N.E.2d 1174 (2003). However, under the revestment doctrine, a litigant may revest a court, that has general jurisdiction over the matter, with both personal and subject matter jurisdiction over the particular cause after the 30-day period following final judgment. People v. Kaeding, 98 Ill.2d 237, 240, 74 Ill.Dec. 509, 456 N.E.2d 11 (1983). "Revestment applies when the parties (1) actively participate without objection (2) in further proceedings that are inconsistent with the merits of the prior judgment." People v. Minniti, 373 Ill. App.3d 55, 65, 311 Ill.Dec. 251, 867 N.E.2d 1237 (2007). A party's conduct is inconsistent with a prior order if the conduct can reasonably be construed as an indication that the party does not view the prior order as final and binding. People v. Gutman, 401 Ill.App.3d 199, 210, 340 Ill.Dec. 342, 928 N.E.2d 61 (2010). If a trial court is revested with jurisdiction, then a notice of appeal, filed within 30 days after a ruling on the untimely postjudgment motion, vests the appellate court with jurisdiction. Minniti, 373 Ill.App.3d at 67, 311 Ill.Dec. 251, 867 N.E.2d 1237.
In this case, the State concedes that it actively participated in the hearing on defendant's untimely postjudgment motion. *617 The State appeared at the hearing. Both the trial court and defense counsel pointed out the untimeliness of the filing of defendant's motion, but the State did not object. Defense counsel also stated that proceedings could occur on the motion only as long as the State did not object. The State still did not object. The State then actively participated in the proceedings. The State argued that defendant's motion should be denied because the sentence imposed by the trial court was appropriate. Furthermore, the hearing on the motion to reconsider was inconsistent with the merits of the prior judgment. By participating in the hearing and not objecting to the untimely motion, the State's acts were inconsistent with the validity of the prior judgment. See People v. Lindmark, 381 Ill. App.3d 638, 652, 320 Ill.Dec. 462, 887 N.E.2d 606 (2008), citing Minniti, 373 Ill. App.3d at 67, 311 Ill.Dec. 251, 867 N.E.2d 1237. Thus, the State's active participation in proceedings that were inconsistent with the merits of the prior sentencing order revested the trial court with jurisdiction of defendant's postjudgment motion. See Minniti, 373 Ill.App.3d at 67, 311 Ill.Dec. 251, 867 N.E.2d 1237. Because defendant's notice of appeal was filed within 30 days after the ruling on his untimely but revested postjudgment motion, it vested this court with jurisdiction. See Minniti, 373 Ill.App.3d at 67, 311 Ill. Dec. 251, 867 N.E.2d 1237. Accordingly, we will address the merits of defendant's appeal.

B. Sufficiency of the EvidenceUnlawful Possession of a Weapon by a Felon
Defendant first argues that where the State failed to establish that either of defendant's codefendants was a convicted felon, the State failed to prove defendant guilty beyond a reasonable doubt of unlawful possession of a weapon by a felon under an accountability theory.
Initially, we discuss the State's argument that defendant forfeited this issue by failing to object to the jury instruction defining unlawful possession of a weapon by a felon or to raise the issue in his posttrial motion. The State cites People v. Rachel, 123 Ill.App.3d 600, 78 Ill.Dec. 840, 462 N.E.2d 959 (1984), to support its argument. In Rachel, this court stated, it is "axiomatic that a defendant cannot complain of error in instructions to which he has acquiesced, induced or invited or which were given at his request." Rachel, 123 Ill.App.3d at 606, 78 Ill.Dec. 840, 462 N.E.2d 959. The State fails to recognize that, unlike the defendant in Rachel, defendant in this case is not challenging the jury instruction given at trial; rather, he is arguing that the State failed to prove him guilty beyond a reasonable doubt. In People v. Lucas, 231 Ill.2d 169, 325 Ill.Dec. 239, 897 N.E.2d 778 (2008), our supreme court held that a defendant's argument that the State failed to prove him guilty beyond a reasonable doubt is not subject to the normal rules of forfeiture and may be raised for the first time on appeal. Lucas, 231 Ill.2d at 174-75, 325 Ill.Dec. 239, 897 N.E.2d 778. Thus, forfeiture does not apply to this case.
Where a defendant challenges his conviction as based on insufficient evidence, we must determine whether, after considering all of the evidence in the light most favorable to the prosecution, any rational trier of fact could have found the essential elements of the crime beyond a reasonable doubt. See People v. Siguenza-Brito, 235 Ill.2d 213, 224, 336 Ill.Dec. 223, 920 N.E.2d 233 (2009). However, where the facts are uncontested, we review de novo the sufficiency of the evidence. See People v. Chirchirillo, 393 Ill.App.3d 916, 921, 332 Ill.Dec. 703, 913 N.E.2d 635 (2009).
In this case, the relevant facts are uncontested. Defendant was convicted of unlawful *618 possession of a weapon by a felon under an accountability theory. At trial, the evidence established that Wilson and Moore possessed weapons during the course of the offenses but that defendant did not. It is also uncontroverted that defendant has a prior felony conviction. However, the State did not present any evidence that Wilson and Moore were convicted felons. Because the relevant facts are uncontested, and the issue raised by defendant is whether these facts are sufficient to establish the elements of unlawful possession of a weapon by a felon under an accountability theory, we review de novo defendant's claim of insufficient evidence. Chirchirillo, 393 Ill.App.3d at 921, 332 Ill. Dec. 703, 913 N.E.2d 635.
Under Illinois law, a person is legally accountable for another's criminal conduct when "[e]ither before or during the commission of an offense, and with the intent to promote or facilitate such commission, he solicits, aids, abets, agrees or attempts to aid, such other person in the planning or commission of the offense." 720 ILCS 5/5-2(c) (West 2006); see People v. Dennis, 181 Ill.2d 87, 96, 229 Ill.Dec. 552, 692 N.E.2d 325 (1998). In Illinois, in order to prove unlawful possession of a weapon by a felon, the State must prove beyond a reasonable doubt that the defendant (1) knowingly possessed a firearm and (2) has been convicted of a felony. 720 ILCS 5/24-1.1(a) (West 2006).
As the latter statute provides, it is the person possessing the weapon who must be a convicted felon. 720 ILCS 5/24-1.1(a) (West 2006); Chirchirillo, 393 Ill. App.3d at 925, 332 Ill.Dec. 703, 913 N.E.2d 635. "A charge based on accountability must necessarily flow from the principal crime at issue." People v. Hicks, 181 Ill.2d 541, 547, 230 Ill.Dec. 244, 693 N.E.2d 373 (1998). Thus, recently, this court held that to support a conviction of unlawful possession of a weapon by a felon under an accountability theory, the evidence must establish that the principal who possessed the weapon was a convicted felon. Chirchirillo, 393 Ill.App.3d at 925-26, 332 Ill. Dec. 703, 913 N.E.2d 635.
In this case, no evidence was presented to establish that either Wilson or Moore (as principals) was a convicted felon. Therefore, the State failed to establish beyond a reasonable doubt the essential elements of unlawful possession of a weapon by a felon under an accountability theory. Accordingly, defendant's conviction of this offense is reversed and his sentence vacated.

C. Necessity Instruction
Next defendant argues that, where defendant's testimony that he participated in the crimes to avert harm to his family constituted, at the very least, "some evidence" to support his affirmative defense of necessity, the trial court erred in refusing to instruct the jury on the defense.
Initially, we address the standard of review. Quoting People v. Everette, 141 Ill.2d 147, 157, 152 Ill.Dec. 377, 565 N.E.2d 1295 (1990), defendant contends that "[i]t is a matter of law whether the defendant has met the evidentiary minimum entitling him to instructions on an affirmative defense." Generally, matters of law are reviewed de novo. See People v. Vargas, 396 Ill.App.3d 465, 474, 478, 335 Ill.Dec. 695, 919 N.E.2d 414 (2009). Conversely, the State argues that an abuse-of-discretion standard applies to a trial court's decision whether to give a requested instruction on an affirmative defense. We agree with the State.
Although our supreme court made the statement quoted by defendant in its 1990 decision in Everette, no Illinois court has interpreted that statement as an intent by the supreme court to change the standard *619 of review from abuse of discretion to de novo. People v. Couch, 387 Ill.App.3d 437, 444, 326 Ill.Dec. 401, 899 N.E.2d 618 (2008). In fact, in 2006, our supreme court stated, "The giving of jury instructions is a matter within the sound discretion of the trial court." People v. Jones, 219 Ill.2d 1, 31, 300 Ill.Dec. 709, 845 N.E.2d 598 (2006). Thus, in this case, we will apply the abuse-of-discretion standard to the trial court's decision to refuse to instruct the jury regarding the necessity defense. See also Couch, 387 Ill.App.3d at 444, 326 Ill.Dec. 401, 899 N.E.2d 618.
The affirmative defense of necessity is codified in the State of Illinois. Section 7-13 of the Criminal Code of 1961 (Code) states:
"Necessity. Conduct which would otherwise be an offense is justifiable by reason 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." 720 ILCS 5/7-13 (West 2006).
The defense of necessity is available to a defendant, as a matter of law, if (1) the person claiming the defense was without blame in occasioning or developing the situation, and (2) the person reasonably believed that his conduct was necessary to avoid a public or private injury greater than the injury that might have resulted from his conduct. People v. Janik, 127 Ill.2d 390, 399, 130 Ill.Dec. 427, 537 N.E.2d 756 (1989).[1] A defendant is entitled to a jury instruction on necessity if the evidence supports such instruction; this is so even if the evidence is slight. See People v. Kucavik, 367 Ill.App.3d 176, 179, 304 Ill.Dec. 913, 854 N.E.2d 255 (2006).
Defendant argues that he was without blame for the entire incident. He testified that he left his home with Wilson and Moore on July 6, 2006, believing that he was going to help them with a moving job. Defendant further testified that, while he followed the truck, Wilson brandished a gun and told him that there was going to be a robbery. Wilson told defendant that he did not tell defendant before because he knew that defendant would not have gone along with it. Defendant also testified that Wilson and Moore repeatedly warned defendant not to stray from them and that he feared that his noncooperation would cause them to harm his family. Wilson and Moore knew where to find his family because they had picked defendant up at his home that morning. Defendant argues that, based on this testimony, the jury could have found that defendant chose to act illegally to avert harm to his family.
The evidence might satisfy the first prong of the necessity defense because there was evidence that defendant believed that he was going on a moving job when he was picked up on the morning of the offenses. However, defendant did not satisfy the second prong of the necessity defense, because he had ample opportunities to comply with the law.
Regarding this second prong, necessity involves a choice between two admitted evils where other options are unavailable. Kratovil, 351 Ill.App.3d at 1034, 286 Ill.Dec. 868, 815 N.E.2d 78. The conduct chosen by the defendant must promote some value higher than the value *620 that would be promoted by complying with the law. Kratovil, 351 Ill.App.3d at 1034, 286 Ill.Dec. 868, 815 N.E.2d 78. Illegal conduct is justified by necessity only if the defendant's conduct was the only reasonable alternative available under the circumstances. Kratovil, 351 Ill.App.3d at 1034, 286 Ill.Dec. 868, 815 N.E.2d 78. Thus, if other alternatives existed that would have caused less harm, the defendant was not justified in breaking the law, and was not entitled to the necessity defense instruction. Kratovil, 351 Ill.App.3d at 1034, 286 Ill.Dec. 868, 815 N.E.2d 78.
In this case, defendant had other reasonable alternatives to acting as an accomplice to armed robbery and aggravated kidnapping. Defendant's own testimony revealed that when defendant knew what was happening and had opportunities to withdraw or ask for help, he chose to continue his association with Wilson and Moore and aid and abet them in their criminal conduct.
Defendant testified that, after he knew that he was contributing to numerous crimes, he was left sitting alone in the van that Moore and Wilson used to commit armed robbery and kidnapping. Yet, defendant did not attempt to flee or use his cell phone to call 911 or anyone else; instead, he smoked marijuana. Despite the fact that defendant had ample opportunity to use his cell phone to call 911 or his family, he never did. Further, when defendant was driving the van while Moore and Wilson were in the truck with Saley, he could have driven away instead of following them. Also, when a state trooper stopped the truck, defendant could have stopped and asked the trooper for help. Later, defendant had another opportunity to ask for help when he dropped Salgado off at an accident site where police officers were present. Defendant testified that he did not ask for help from the state trooper or the police officers because he was a felon on parole and afraid that he would be arrested. Although defendant had ample opportunity to flee, he met up with Wilson and Moore, helped them get rid of the stolen truck, and then went back to Moore's house to load the stolen property into Moore's garage and smoke marijuana.
In summary, because defendant had reasonable alternatives other than aiding and abetting Wilson and Moore in their criminal conduct, the defense of necessity was unavailable to him. Thus, the trial court did not abuse its discretion by refusing to present the defense to the jury.

D. Sentence for Aggravated Kidnapping
Next, defendant argues that his "sentence for aggravated kidnapping violate[s] the proportionate penalties clause of the Illinois Constitution because the sentencing range for aggravated kidnapping is greater than the sentencing range of an offense with identical elements, namely armed violence predicated on kidnapping." Defendant was convicted of two counts of aggravated kidnapping (720 ILCS 5/10-2(a)(6) (West 2006)), and was sentenced on each count to 12 years in prison for the offense itself, with an additional 15 years because his codefendants were armed with firearms during the kidnapping (720 ILCS 5/10-2(b) (West 2006)). Defendant argues that the 15-year enhancement violates the Illinois Constitution because it caused the sentencing range for aggravated kidnapping to be greater than the sentencing range for an offense with identical elements, armed violence predicated on kidnapping. Defendant urges this court to vacate the 15-year enhancement and reduce defendant's sentence to 12 years in prison. The State confesses error, acknowledging that the 15-year enhancement is improper. However, the State does not agree with defendant that this court should strike the 15-year enhancement *621 and modify defendant's sentence to 12 years in prison. The State argues that, pursuant to People v. Hauschild, 226 Ill.2d 63, 312 Ill.Dec. 601, 871 N.E.2d 1 (2007), we must remand this case for resentencing on the aggravated kidnapping counts.
Whether a sentencing provision violates the proportionate penalties clause is a matter of law, which is reviewed de novo. Hauschild, 226 Ill.2d at 83, 312 Ill.Dec. 601, 871 N.E.2d 1. A challenge to a statute's constitutionality may be raised at any time. People v. Wright, 194 Ill.2d 1, 23-24, 251 Ill.Dec. 469, 740 N.E.2d 755 (2000). The proportionate penalties clause provides that "[a]ll penalties shall be determined both according to the seriousness of the offense and with the objective of restoring the offender to useful citizenship." Ill. Const.1970, art. I, § 11. A defendant's sentence can violate the proportionate penalties clause if, inter alia, the sentence "is greater than the sentence for an offense with identical elements." Hauschild, 226 Ill.2d at 74, 312 Ill.Dec. 601, 871 N.E.2d 1. "`[T]he proportionate penalties clause is violated where two offenses have identical elements, but are subject to different sentencing ranges.'" People v. Baker, 341 Ill.App.3d 1083, 1088, 276 Ill.Dec. 458, 794 N.E.2d 353 (2003), quoting People v. Davis, 177 Ill.2d 495, 503, 227 Ill.Dec. 101, 687 N.E.2d 24 (1997).
In this case, defendant was convicted of aggravated kidnapping (720 ILCS 5/10-2(a)(6) (West 2006)). Section 10-2(a)(6) of the Code provides that a person is guilty of aggravated kidnapping if he "[c]ommits the offense of kidnapping while armed with a firearm." Aggravated kidnapping in violation of section 10-2(a)(6) is punished as a "Class X felony for which 15 years shall be added to the term of imprisonment." 720 ILCS 5/10-2(b) (West 2006). The sentencing range for an unenhanced Class X felony is 6 to 30 years. 730 ILCS 5/5-8-1(a)(3) (West 2006). Thus, when the sentence is enhanced under section 10-2(a)(6), the sentencing range is 21 to 45 years.
In this case, the trial court sentenced defendant to a term of 12 years in prison for aggravated kidnapping and then added the 15-year enhancement because Wilson and Moore were armed with firearms during the kidnapping. Thus, defendant was sentenced to a total of 27 years for his conviction of aggravated kidnapping.
However, aggravated kidnapping while armed with a firearm has the same elements as armed violence predicated on kidnapping (720 ILCS 5/33A-2(a) (West 2006)), but aggravated kidnapping while armed with a firearm carries a greater sentence. A person commits armed violence if he commits any of certain felonies while armed with a category I, II, or III weapon. 720 ILCS 5/33A-2(a) (West 2006). A handgun is a category I weapon, and kidnapping is one of the felonies upon which armed violence can be predicated. 720 ILCS 5/33A-1(c)(2), 33A-2(a) (West 2006). Therefore, a person commits the offense of armed violence if he commits the act of kidnapping while armed with a firearm. These are precisely the same elements as aggravated kidnapping while armed with a firearm. However, armed violence predicated upon kidnapping is punishable by only 15 to 30 years in prison. 720 ILCS 5/33A-3(a) (West 2006). Thus, the 15-year enhancement for aggravated kidnapping while armed with a firearm (720 ILCS 5/10-2(a)(6), (b) (West 2006)) violates the proportionate penalties clause of the Illinois Constitution (Ill. Const.1970, art. I, § 11) and is unenforceable. See Hauschild, 226 Ill.2d at 86, 312 Ill.Dec. 601, 871 N.E.2d 1.
We now address whether the case should be remanded for resentencing, as the State urges, or whether we should modify defendant's sentence, as argued by *622 defendant. Our supreme court provides the answer in Hauschild. The court held:
"[W]hen an amended sentencing statute has been found to violate the proportionate penalties clause, the proper remedy is to remand for resentencing in accordance with the statute as it existed prior to the amendment. See People v. Pizano, 347 Ill.App.3d 128, 136 [282 Ill. Dec. 512, 806 N.E.2d 1100] (2004) (proper remedy where a statutory amendment is found to have violated proportionate penalties clause is to remand the cause for a new sentencing hearing under the statute in effect before the adoption of the amendment); see also People v. Gersch, 135 Ill.2d 384, 390 [142 Ill. Dec. 767, 553 N.E.2d 281] (1990) (`The effect of enacting an unconstitutional amendment to a statute is to leave the law in force as it was before the adoption of the amendment'). Thus, while the 12-year term originally imposed on defendant is a proper one, we remand, as earlier noted, in order to allow the trial court to reevaluate defendant's sentence in light of his cumulative sentence and to then resentence him within the range for armed robbery as it existed prior to being amended by Public Act 91-404, effective January 1, 2000. In light of this holding, we reject defendant's claim that his armed robbery while armed with a firearm conviction should be reduced to `simple robbery.'" (Emphasis added.) Hauschild, 226 Ill.2d at 88-89, 312 Ill.Dec. 601, 871 N.E.2d 1.
Defendant attempts to distinguish Hauschild from this case by stating that the trial court in this case does not need to reevaluate defendant's sentence for aggravated kidnapping in light of his cumulative sentences, as required in Hauschild. See Hauschild, 226 Ill.2d at 89, 312 Ill.Dec. 601, 871 N.E.2d 1. Defendant contends that this case is different from Hauschild because in this case the sentences imposed for the other convictions are valid and the trial court explicitly stated that it was sentencing defendant to 12 years in prison for each count of aggravated kidnapping. However, the trial court did not state that, were the enhanced portion of the sentence invalidated, the court would still sentence defendant to the same 12 years. We believe that there is a distinction between sentencing a defendant to a term of years without a comment regarding the possible invalidity of an enhancement and doing so with a comment regarding whether the invalidity of the enhancement would affect the unenhanced portion of the sentence. The underlying purpose of Hauschild's rule is to allow the trial court to properly sentence the defendant under the proper statute. Because the trial court sentenced defendant within the parameters of a void statute without comment on the effect of the enhancement's invalidity on the unenhanced sentence, it must be given the opportunity to reevaluate defendant's sentence in light of his cumulative sentences in accordance with the statute as it existed prior to the amendment. Hauschild, 226 Ill.2d at 88-89, 312 Ill.Dec. 601, 871 N.E.2d 1.
Accordingly, we follow Hauschild's holding and remand this matter to the trial court for resentencing on defendant's convictions of aggravated kidnapping in accordance with the statute as it existed prior to the amendment.[2]

E. Credit for Time Served in Custody
Defendant argues that he is entitled to an additional day of credit for the time he *623 served in custody before sentencing. The State confesses error on this issue. Because the trial court incorrectly credited defendant with time served in custody from July 7, 2006, where defendant was actually arrested and brought into custody on July 6, 2006, defendant should be given an additional day of credit for the time he served in custody before sentencing and the mittimus should be corrected.

IV. CONCLUSION
For these reasons, we affirm as modified in part, reverse in part, and remand for resentencing.
Affirmed as modified in part and reversed in part; cause remanded.
ZENOFF, P.J., and HUTCHINSON, J., concur.
NOTES
[1]  We misstated this standard in People v. Kratovil, 351 Ill.App.3d 1023, 1033, 286 Ill.Dec. 868, 815 N.E.2d 78 (2004) ("the defendant reasonably believed that her conduct was necessary to avoid a public or private injury greater than the injury that might have resulted from literal compliance with the law").
[2]  Prior to the enactment of Public Act 91-404 on January 1, 2000, aggravated kidnapping was a Class X felony with a sentencing range of 6 to 30 years' imprisonment. See 720 ILCS 5/10-2(b) (West 1998); 730 ILCS 5/5-8-1(a)(3) (West 1998).
