
4 So.3d 926 (2009)
STATE of Louisiana, Appellee,
v.
James W. JOHNSON, Appellant.
No. 44,004-KA.
Court of Appeal of Louisiana, Second Circuit.
February 25, 2009.
*927 Louisiana Appellate Project, by Annette F. Roach, for Appellant.
J. Schuyler Marvin, District Attorney, John M. Lawrence, Charles A. Smith, Edward C. Jacobs, Assistant District Attorneys, for Appellee.
Before STEWART, GASKINS and LOLLEY, JJ.
STEWART, J.
The defendant, James W. Johnson, was convicted of distribution of a Schedule II controlled dangerous substance (methadone), a violation of La. R.S. 40:967. He was sentenced to 10 years at hard labor. The defendant now appeals. For the reasons stated herein, we affirm the defendant's conviction, but vacate his sentence, and remand for resentencing in accordance with this opinion.

FACTS
On August 15, 2006, the defendant was originally charged by bill of information with one count of distribution of a Schedule II CDS, methodone, in violation of La. R.S. 40:967, and one count of distribution of a Schedule II CDS, oxycodone, in violation of La. R.S. 40:967. Pursuant to a plea agreement, the defendant entered a guilty plea to the offense of distribution of methadone on October 17, 2006. The offense of distribution of oxycodone was noll prossed by the District Attorney. In exchange for the guilty plea, the state agreed not to file a habitual offender bill against the defendant. During the guilty plea colloquy, the state explained that the factual basis of the distribution of methadone charge stemmed from an incident on June 30, 2006, where the defendant sold $100 worth of methadone to a confidential informant, who was being observed in an operation administered by the Bossier City Police Department.
The defendant was advised during the guilty plea colloquy that the sentencing range for the offense of distribution of methadone was between 2 to 30 years. The defendant's trial counsel did not object to the sentencing range.
Before imposing the sentence, the trial court considered statements made in the defendant's presentence investigation report. Specifically, the trial court noted *928 that the defendant was 46 years old and that the defendant was convicted of distribution of marijuana on October 13, 1982. The court also stated that the defendant had a "fairly significant, prior criminal history." The defendant pleaded with the court to show mercy and to consider the fact that he previously had two heart surgeries and that he had two children whom he was trying to raise. The defendant was ultimately sentenced to 10 years at hard labor on January 9, 2007, with credit for time served. The court informed the defendant of his right to file an appeal and an application for post-conviction relief.
A motion to reconsider sentence was not filed.
On October 1, 2007, the defendant filed an application for post-conviction relief with the trial court. In his application, the defendant set forth the following claims: (1) Ineffective Assistance of Counsel, (2) Excessive Sentence, and (3) Lapse of the "10 year cleansing period."
The state filed an answer containing procedural objections to the defendant's post-conviction application.
On April 21, 2008, the trial court denied the defendant's post-conviction application. The court determined that the defendant failed to prove that his trial counsel was ineffective and that the defendant could not raise an excessiveness of sentence claim in an application for post-conviction relief. The 10-year cleansing period did not apply because the defendant was not billed as a multiple offender.
On May 1, 2008, the defendant filed a motion with the court seeking to supplement his post-conviction application and to file an appeal. The trial court granted the defendant's request to file an out-of-time appeal on July 9, 2008. The defendant now appeals, urging four assignments of error.

LAW AND DISCUSSION

Assignment of Error Number One: Illegal Sentence
In his first assignment of error, the defendant argues that the trial court erred in applying the harsher sentencing provisions in effect at the time of his conviction, instead of the sentencing provisions in effect at the time of the commission of the offense. Therefore, the defendant asserts that the sentence imposed by the trial court resulted in the ex post facto application of the law which is prohibited by both the federal and state constitutions, because he was sentenced under a statute where the sentencing term was amended under a new law that increased the original maximum term of 10 years to a new term between 2 and 30 years.
An illegal sentence may be corrected at any time by the court that imposed the sentence or by an appellate court on review. La. C. Cr. P. art. 882. An ex post facto application of law is illegal, as it violates Article 1, § 10 of the United States Constitution and Article I, § 23 of Louisiana's constitution. In order to prevent a violation under the ex post facto clauses, the supreme court has held that a defendant convicted of a crime can only be sentenced under the sentencing law in effect at the time the crime was committed, even if the Legislature passes a new sentencing law that becomes effective after the defendant commits the crime and before he is convicted of the crime. State v. Hyde, 07-1314 (La.11/21/07), 968 So.2d 726; State ex. rel. Olivieri v. State, 00-0172 (La.2/21/01), 779 So.2d 735; but see State v. Mayeux, 01-3195 (La.6/21/02), 820 So.2d 526 (where the legislative intent and ameliorative nature of a new sentencing law caused the court to apply the new law effective at the time of the defendant's *929 conviction instead of the old law effective at the time he committed the offense).
At the time of the offense in the present case, June 30, 2006, La. R.S. 40:967(B)(5) provided:
(5) Any other controlled dangerous substance classified in Schedule II except pentazocine, amphetamine, methamphetamine, cocaine, or oxycodone shall be sentenced to a term of imprisonment at hard labor for not more than ten years, and in addition may be sentenced to pay a fine of not more than fifteen thousand dollars.
La. R.S. 40:967(B)(4)(b) and (5) were later amended in 2006 by Act 68. La. R.S. 40:967(B)(4)(b) now provides:
(B) Distribution, dispensing, or possession with intent to produce, manufacture, distribute, or dispense cocaine or cocaine base or a mixture or substance containing cocaine or its analogues as provided in Schedule II(A)(4) of R.S. 40:964 or oxycodone as provided in Schedule II(A)(1)(o) of R.S. 40:964 or methadone as provided in Schedule II(B)(11) of R.S. 40:964 shall be sentenced to a term of imprisonment at hard labor for not less than two nor more than thirty years, with the first two years of said sentence being without the benefit of parole, probation, or suspension of sentence; and may, in addition be sentenced to pay a fine of not more than fifty thousand dollars. (emphasis added)
La. R.S. 40:967(B)(5) now states:
(4) Any other controlled dangerous substance classified in Schedule II except pentazocine, amphetamine, methamphetamine, cocaine, oxycodone, or methadone shall be sentenced to a term of imprisonment at hard labor for not more than ten years, and in addition may be sentenced to pay a fine of not more than fifteen thousand dollars. (emphasis added)
Act 68 changed the sentencing range for distribution of methadone to 2-30 years, with the first 2 years without benefit of probation, parole, or suspension of sentence, and a possible fine not to exceed $50,000. 2006 La. Acts 68, § 2. The effective date of Act 68 was August 15, 2006. La. Const. art. III, § 19.
The offense in this case was committed on June 30, 2006, approximately two months prior to the effective date of the 2006 amendments to La. R.S. 40:967, which were made effective on August 15, 2006. Therefore, the maximum penalty that the defendant should have been exposed to was a maximum term of 10 years and a possible fine not to exceed $15,000.
Nevertheless, the defendant was erroneously informed during his guilty plea colloquy that he was subject to a sentence in the range of 2-30 years, which is the range provided by Act 68. Although the trial court erred in stating the wrong sentencing range, the 10-year sentence imposed by the trial court was within the range outlined in pre-Act 68 La. R.S. 40:967. The question then becomes whether the trial court's error had a significant impact on the sentence that the defendant ultimately received. The record indicates that the trial court, after considering the defendant's age and criminal history, decided to impose a sentence on the defendant that was one-third of the maximum term that it believed that it could impose. It is unclear from the record whether the trial court, now cognizant of the proper sentencing range and after considering the requisite sentencing factors, would impose the maximum 10-year term on the defendant or impose some lesser term. Finding that this assignment of error bears merit, we vacate the defendant's 10-year *930 sentence and remand the case to the trial court for resentencing.[1]
The three remaining assignments of error concern the excessiveness of the defendant's sentence and the ineffective assistance of his trial counsel, and are all raised under the assumption that we find his ex post facto assignment without merit. As discussed above, this court has determined that the defendant's sentence must be vacated after finding that an ex post facto violation did exist. Therefore, the defendant's second, third, and fourth assignments of error are moot, and the discussion on this subject is pretermitted.

CONCLUSION
For the foregoing reasons, we affirm the defendant's conviction, but vacate his sentence, and remand the case to the trial court for resentencing in accordance with the provisions of La. R.S. 40:967 as of the date of the commission of the offense.
AFFIRMED CONVICTION; VACATED SENTENCE; REMANDED FOR RESENTENCING.
NOTES
[1]  Since this case does not involve a sentencing cap, the rule in State v. Young, 96-0195 (La. 10/15/96), 680 So.2d 1171, prohibiting defendants from appealing a sentence that was the result of a plea bargain is not violated.
