
659 N.E.2d 563 (1995)
Shawn L. ELKINS, Appellant-Defendant,
v.
STATE of Indiana, Appellee-Plaintiff.
No. 30A01-9503-CR-67.
Court of Appeals of Indiana.
September 18, 1995.
Publication Ordered December 18, 1995.
*564 Michael R. Burrow, Greenfield, for Appellant.
Pamela Carter, Attorney General, James A. Joven, Deputy Attorney General, Indianapolis, for Appellee.

OPINION
NAJAM, Judge.

STATEMENT OF THE CASE
Shawn L. Elkins appeals from the trial court's sentencing order. In May of 1993, Elkins was convicted of Escape, as a Class C felony, and was found to be an habitual offender. The trial court sentenced Elkins to eight years on the escape conviction and enhanced his sentence by twelve years based upon the habitual offender adjudication. The trial court enhanced Elkins' sentence pursuant to the statute in effect at the time of the sentencing hearing. On appeal, this court remanded the case to the trial court for resentencing due to the absence of a record of the sentencing hearing. Elkins v. State, (June 7, 1994), Ind.App., No. 30A04-9312-CR-475, 635 N.E.2d 1163 trans. denied. On remand, the trial court imposed a sentence of two years on the escape conviction enhanced by twenty years for the habitual offender adjudication pursuant to the statute in effect at the time the offense was committed. This resulted in an increase in Elkins' total sentence from his original sentence of twenty years to twenty-two years on resentencing.
We reverse and remand.

ISSUE
Elkins presents several issues on appeal which we consolidate and restate as whether the trial court erred when it resentenced Elkins under the statute in effect at the time the offense was committed.

DISCUSSION AND DECISION
Elkins contends the trial court erred when, on remand, it resentenced him pursuant to the habitual offender statute in effect at the time he committed the offense. We agree.
The legislature fixes penalties for crimes, and a trial court's discretion in sentencing does not extend beyond the limits prescribed by statute. Golden v. State (1990), Ind.App., 553 N.E.2d 1219, 1222, trans. denied. Within statutory boundaries, sentencing is conducted in the discretion of the trial court and a sentence will not be disturbed on appeal unless it amounts to a manifest abuse of discretion. Ellis v. State (1991), Ind., 567 N.E.2d 1142, 1146. However, where a court imposes an erroneous sentence, courts have a duty to correct it. Watkins v. State (1992), Ind.App., 588 N.E.2d 1342,1344.
Elkins asserts that he is entitled to be sentenced under the amended version of the statute in effect at the time of his sentencing rather than the statute in effect at the time of the offense because the amended statute reduces the maximum sentence to which he would be subjected. During his first sentencing *565 hearing, the trial court sentenced Elkins pursuant to the version of Indiana Code § 35-50-2-8 in effect at the time of sentencing.[1] Upon remand, the State argued and the trial court determined that the sentence should be imposed pursuant to the version of the Indiana Code § 35-50-2-8 in effect at the time the offense was committed.[2]
Generally, the statute in effect at the time of the offense is the statutory basis for sentencing. Lunsford v. State (1994), Ind.App., 640 N.E.2d 59, 60 (quoting Dowdell v. State (1975), 166 Ind.App. 395, 399, 336 N.E.2d 699, 701, trans. denied). Where the legislature amends a penalty, the courts must determine whether the legislature intended that the amendment be applied to offenses committed before the amendment becomes effective. Dowdell, 166 Ind.App. at 400, 336 N.E.2d at 701. The State argues that the general savings clause, Indiana Code § 1-1-5-1, supplies legislative intent and directs the court to impose a sentence pursuant to the statute in effect at the time the offense was committed. The State's assertion is correct when a penalty is increased ex post facto. Id. However, in Lewandowski v. State (1979), 271 Ind. 4, 389 N.E.2d 706, our supreme court approved the view expressed by Judge Staton in Dowdell that where an amendment to a sentencing statute is ameliorative, the amendment itself is "a sufficient indication of the legislative intent that it be applied to all whom such application would be possible and constitutional." Lewandowski, 271 Ind. at 6, 389 N.E.2d at 707.
Thus, when a defendant is found guilty of an offense, he is to be sentenced in accordance with the statute in force at the time the offense was committed unless an amendment to the statute is effective prior to sentencing and the amendment provides for an ameliorative penalty. State v. Turner (1978), 178 Ind.App. 562, 565, 383 N.E.2d 428, 430. "In determining whether one sentence is greater than another, the maximum severity of the penalty ... is the measure to be used." Dowdell, 166 Ind.App. at 401, 336 N.E.2d at 702. The State asserts that this court determined in Lunsford that this sentencing statute was not ameliorative. Lunsford, 640 N.E.2d at 61. While we determined in Lunsford that the statute was not ameliorative as applied to Class B felonies, we noted that the amendment did reduce the maximum enhancement for Class C and D felonies. Id.
Under the version of Indiana Code § 35-50-2-8 in effect at the time Elkins committed the offense, Elkins would be subjected to a maximum sentence enhancement of thirty years for the habitual offender conviction. Under the version of the statute in effect at the time of sentencing, Elkins would be subjected to a maximum sentence enhancement of not more than three times the presumptive sentence for the underlying offense, but no more than thirty years. Elkins' underlying conviction was for escape, Indiana Code § 35-44-3-5, as a Class C felony with a presumptive sentence of four years. IND. CODE § 35-50-2-6. Elkins' maximum sentence enhancement for the habitual offender conviction under the amended statute would be twelve years.
The statute as amended reduces the maximum sentences for Class C felonies and is therefore ameliorative as applied to Elkins. We conclude that the trial court erred when it enhanced Elkins' sentence pursuant to the law in effect at the time he committed the offense. Thus, we remand this case and direct the trial court to sentence Elkins pursuant to the statute in effect when he was *566 originally sentenced on September 22, 1993.[3]
Reversed and remanded.
SHARPNACK, C.J., and STATON, J., concur.

ORDER
This Court having heretofore handed down its opinion in this appeal marked "Memorandum Decision, Not for Publication"; and the appellant, by counsel, having thereafter filed her Motion to Publish Memorandum Decision pursuant to which this Court issued its order directing the appellee to show cause why the appellant's Motion to Publish should not be granted and the opinion in this case should not be published and the State having failed to file any response to said order, the Court now finds that the opinion in this appeal heretofore handed down in this cause should be granted and this Court's opinion heretofore handed down in this cause, marked "Memorandum Decision, Not for Publication" should now be ordered published.
IT IS THEREFORE ORDERED as follows:
1. The appellant's Motion to Publish Memorandum Decision is granted and this Court's opinion heretofore handed down on September 18, 1995 marked "Memorandum Decision, Not for Publication" is now ordered published.
NOTES
[1]  This section was amended by Public Law 164-1993 § 13 (effective July 1, 1993).
[2]  We note that Elkins contends the State waived its opportunity to assert that he should be sentenced under the prior statute because this was not raised at the first sentencing hearing. Our supreme court has stated that "a sentencing error may be raised at any time." Lewandowski v. State (1979), 271 Ind. 4, 6, 389 N.E.2d 706, 708; see also Niece v. State (1983), Ind.App., 456 N.E.2d 1081, 1084 (trial court has power to correct an illegal sentence even if partially executed). Thus, the State could not waive the right to challenge what it viewed as a sentencing error.
[3]  Because we remand for sentencing, we do not reach Elkins' contention that the increased sentence imposed at the second sentencing hearing constituted vindictive justice.
