
18 So.3d 290 (2009)
Clifton GATLIN, Appellant,
v.
STATE of Mississippi, Appellee.
No. 2007-CA-01650-COA.
Court of Appeals of Mississippi.
April 14, 2009.
Rehearing Denied September 22, 2009.
*291 Imhotep Alkebu-Lan, attorney for appellant.
Office of the Attorney General by John R. Henry, attorney for appellee.
EN BANC.
KING, C.J., for the Court:
¶ 1. Clifton Gatlin appeals the Madison County Circuit Court's dismissal of his petition for post-conviction relief. Gatlin raises two issues on appeal:
I. Whether the trial court erred by dismissing his petition for post-conviction relief as moot, and
II. Whether he entered a valid, intelligent, and voluntary guilty plea.
Finding error, we affirm on other grounds.

FACTS AND PROCEDURAL HISTORY
¶ 2. On November 7, 2005, Gatlin pled guilty to a charge of statutory rape. The trial court accepted Gatlin's guilty plea. Upon the recommendation of the State, Gatlin was sentenced to serve five years in the custody of the Mississippi Department of Corrections (MDOC), which would be stayed and suspended upon the successful completion of six months in the Regimented Inmate Discipline Program (RID), and five years of supervised probation. Additionally, because he was convicted of a sex crime, Gatlin was required to register as a sex offender.
¶ 3. On December 1, 2006, Gatlin filed a petition for post-conviction relief.[1] At that time, Gatlin was incarcerated in the Madison County Jail, waiting to be transferred to the RID program. Gatlin argued that when he pled guilty, he placed significant reliance upon the State's recommendation to suspend his sentence after he successfully completed the RID program. Gatlin argued that when he entered his guilty plea, he was unaware that, since he had been convicted of a sex crime, he was not eligible to participate in the RID program. Because Gatlin was unaware that he was ineligible to participate in the RID program, he argued that his guilty plea was invalid and was not made intelligently and voluntarily. Thus, Gatlin requested that the trial court set aside his conviction and sentence.
¶ 4. On December 5, 2006, Gatlin was transferred to the RID program. He successfully completed the program and was released from custody on May 4, 2007.
¶ 5. Gatlin's petition for post-conviction relief was set for a hearing on August 20, 2007. The trial court noted that Gatlin had already completed the RID program and was no longer in the custody of the MDOC. The State conceded that Gatlin was improperly sentenced to serve time in the RID program. However, the State argued that Gatlin's guilty plea was still valid, and Gatlin failed to show that he had suffered any prejudice based on his sentence. The State recommended that the trial court restructure Gatlin's sentence to place him in the same position that he would have been had he been eligible to participate in the RID program. Gatlin rejected the State's recommendation and requested that the trial court set aside his guilty plea and grant him a new trial.
*292 ¶ 6. Because Gatlin was no longer in the custody of the MDOC, the trial court found that his petition for post-conviction relief was moot. Therefore, the trial court dismissed Gatlin's petition. Despite this dismissal, the trial court also found that Gatlin did not suffer any prejudice based on his sentence. In an effort to remedy the error, the trial court amended Gatlin's sentencing order to show that Gatlin was sentenced to serve five years in the custody of the MDOC, with four and one-half years suspended and three and one-half years of supervised probation.
¶ 7. Still aggrieved, Gatlin timely filed this appeal, raising two issues: (1) whether the trial court erred by dismissing his petition for post-conviction relief as moot, and (2) whether he entered a valid, intelligent, and voluntary guilty plea.

ANALYSIS
¶ 8. This Court will not disturb a trial court's dismissal of a petition for post-conviction relief unless it was clearly erroneous. Williams v. State, 872 So.2d 711, 712(2) (Miss.Ct.App.2004). However, questions of law are reviewed de novo. Brown v. State, 731 So.2d 595, 598(6) (Miss.1999).

I. Whether the trial court erred by dismissing Gatlin's petition for post-conviction relief as moot.
¶ 9. Gatlin argues that the trial court erred by dismissing his petition for post-conviction relief as moot because, although he was no longer incarcerated, he was still in the custody of the MDOC due to his probation. Conversely, the State argues that Gatlin was no longer in the custody of the MDOC for purposes of the Mississippi Uniform Post-Conviction Collateral Relief Act.
¶ 10. One of the purposes of the Mississippi Uniform Post-Conviction Collateral Relief Act "is to provide prisoners with a procedure, limited in nature, to review those objections, defenses, claims, questions, issues or errors which in practical reality could not be or should not have been raised at trial or on direct appeal." Miss.Code Ann. § 99-39-3(2) (Rev.2007) (emphasis added). Mississippi Code Annotated section 99-39-5(1) (Rev.2007) states that "[a]ny prisoner in custody under sentence of a court of record of the State of Mississippi" may claim relief under the Act. Specifically, this Court has held that "in order to take advantage of the post-conviction laws, a person must be currently incarcerated for the crime for which he was convicted by a Mississippi court." Rice v. State, 910 So.2d 1163, 1165-66(9) (Miss.Ct.App.2005) (citing Shaw v. State, 803 So.2d 1282, 1284(7) (Miss.Ct.App. 2002)).
¶ 11. Because Gatlin filed his petition for post-conviction relief while he was incarcerated for the conviction of statutory rape, it is clear that Gatlin was eligible to seek relief under the Act. The question before this Court now is whether Gatlin's petition for post-conviction relief became moot once he was released on supervised probation.
¶ 12. "Where relief, other than an injunction, is sought, a case is moot so long as a judgment on the merits, if rendered, would be of no practical benefit to the plaintiff or detriment to the defendant." Gartrell v. Gartrell, 936 So.2d 915, 916(8) (Miss.2006). When Gatlin filed his petition for post-conviction relief, he was a prisoner in the custody of the MDOC, serving under the sentence imposed by the trial court. However, when Gatlin's petition for post-conviction relief was heard by the trial court, he had been released on supervised probation. If a defendant violates any of the conditions placed on his probation, the trial court may revoke his probation *293 and order him to serve the sentence originally imposed. See Miss.Code Ann. § 47-7-37 (Supp.2008). Thus, although Gatlin was no longer incarcerated, he was still under the effects of the sentence imposed by the trial court and would suffer a detriment, absent a judgment on the merits of his petition for post-conviction relief.[2]
¶ 13. Because Gatlin timely filed his petition for post-conviction relief while he was incarcerated, his subsequent release on supervised probation did not make his claims moot. The controversy was still alive; thus, we find that the trial court erred by dismissing Gatlin's petition for post-conviction relief as moot. Despite the trial court's error, we affirm the trial court's dismissal of Gatlin's petition for post-conviction relief on other grounds, which are discussed below. See Puckett v. Stuckey, 633 So.2d 978, 980 (Miss. 1993); Powell v. State, 824 So.2d 661, 667(26) (Miss.Ct.App.2002).

II. Whether Gatlin entered an intelligent and voluntary guilty plea.
¶ 14. Gatlin argues that the State improperly induced him to enter a guilty plea with the promise that he could serve six months in the RID program and be released on probation. Gatlin contends that he was unaware that he was not eligible to participate in the RID program and maintains that he would not have pled guilty if he had known of his ineligibility.
¶ 15. This Court must note the clear existence of a second reason to hold Gatlin's action not to be moot. That reason is the State's confusion as to whether Gatlin's participation in the RID program was covered under Mississippi Code Annotated section 47-7-47 (Rev.2004) or Mississippi Code Annotated section 47-5-138 (Supp. 2008). Thus, in the Court's analysis of this issue, we must distinguish the difference between the trial court's discretion to place an offender on a program of earned probation and the MDOC's earned-time allowance program.
¶ 16. The RID program allows offenders to earn early release after a brief period of confinement. See Curry v. State, 855 So.2d 452, 454(5) (Miss.Ct.App.2003). Section 47-7-47 allows the trial court to retain jurisdiction, suspend a sentence, and place an offender on a program of earned probation. The statute provides, in pertinent part, that:
(1) The judge of any circuit court may place an offender on a program of earned probation after a period of confinement as set out herein and the judge may seek the advice of the commissioner and shall direct that the defendant be under the supervision of the department.
(2)(a) Any circuit court or county court may, upon its own motion, acting upon the advice and consent of the commissioner not earlier than thirty (30) days nor later than one (1) year after the defendant has been delivered to the custody of the department, to which he has been sentenced, suspend the further execution of the sentence and place the defendant on earned probation, except when a death sentence or life imprisonment is the maximum penalty which may be imposed or if the defendant has been confined two (2) or more times for the conviction of a felony on a previous occasion in any court or courts of the United States and of any state or territories thereof or has been convicted of a *294 felony involving the use of a deadly weapon.
Miss.Code Ann. § 47-7-47(1) and (2)(a).
¶ 17. Conversely, section 47-5-138 provides for an earned-time allowance program to be administered by the MDOC. Section 47-5-138 states, in pertinent part, that:
(1) The [MDOC] may promulgate rules and regulations to carry out an earned[-]time allowance program based on the good conduct and performance of an inmate. An inmate is eligible to receive an earned[-]time allowance of one-half (½) of the period of confinement imposed by the court except those inmates excluded by law. When an inmate is committed to the custody of the [MDOC], the [MDOC] shall determine a conditional earned[-]time release date by subtracting the earned[-]time allowance from an inmate's term of sentence. This subsection does not apply to any sentence imposed after June 30, 1995.
....
(5) For any sentence imposed after June 30, 1995, an inmate may receive an earned[-]time allowance of four and one-half (4 1/2) days for each thirty (30) days served if the [MDOC] determines that the inmate has complied with the good conduct and performance requirements of the earned[-]time allowance program. The earned[-]time allowance under this subsection shall not exceed fifteen percent (15%) of an inmate's term of sentence; however, beginning July 1, 2006, no person under the age of twenty-one (21) who has committed a nonviolent offense, and who is under the jurisdiction of the [MDOC], shall be subject to the fifteen percent (15%) limitation for earned[-]time allowance as described in subsection (5).
Miss.Code. Ann. § 47-5-138(1) and (5). Mississippi Code Annotated section 47-5-139(1)(d) (Rev.2004) specifically states that an inmate who was convicted of a sex crime is not eligible for the MDOC's earned-time allowance program. See Cochran v. State, 969 So.2d 119, 122(10) (Miss.Ct.App.2007).
¶ 18. In this case, Gatlin was sentenced to serve time in the RID program under the trial court's discretion pursuant to section 47-7-47, not under the earned-time allowance program administered by the MDOC pursuant to section 47-5-138. Although sex offenders are ineligible to participate in the earned-time allowance program administered by the MDOC, this language does not appear in section 47-7-47. Pursuant to section 47-7-47, the maximum punishment for the offense with which Gatlin was charged was not the death penalty or life imprisonment, nor had Gatlin been previously confined two or more times for a felony conviction. Thus, the trial court did not err by sentencing Gatlin to participate in the RID program in its original sentence.
¶ 19. Even if Gatlin were ineligible to participate in the RID program, we still cannot find that the trial committed error. "[A] defendant's fundamental right of freedom from an illegal sentence is violated when the sentence imposes an undue burden on the defendant, such as when the offer induces a plea and the State later seeks to rescind the suspension solely because it was statutorily barred." Myers v. State, 897 So.2d 198, 201(12) (Miss.Ct.App. 2004).
¶ 20. In this case, the State did not rescind its plea deal with Gatlin. The State conceded what it thought was error. To remedy the perceived error, the trial court amended Gatlin's sentence-five years to serve, with four and one-half years suspended and three and one-half years of supervised probation-to reflect the time he *295 had already served. The trial court's amendment of Gatlin's sentence placed Gatlin in the same position as did his participation in the RID program.
¶ 21. This Court has held that:
A defendant should not be allowed to reap the benefits of an illegal sentence, which is lighter than what the legal sentence would have been, and then turn around and attack the legality of the illegal, lighter sentence when it serves his interest to do so.
Brooks v. State, 919 So.2d 179, 181(7) (Miss.Ct.App.2005) (quoting Graves v. State, 822 So.2d 1089, 1092(11) (Miss.Ct. App.2002)). If Gatlin were ineligible to participate in the RID program, he would have received an illegal sentence that was lighter than what his legal sentence would have been. If we had found that the trial court committed error by sentencing Gatlin to the RID program, it would have been harmless error since any error favored Gatlin. Thus, we find that Gatlin's assignment of error is wholly without merit.

CONCLUSION
¶ 22. Because Gatlin timely filed his petition for post-conviction relief while he was incarcerated, his subsequent release on supervised probation did not render his claims moot. Thus, the trial court erred by dismissing Gatlin's petition for post-conviction relief as moot. However, we affirm the trial court's dismissal of Gatlin's petition for post-conviction relief on other grounds. We find that the trial court did not err by sentencing Gatlin to participate in the RID program, and nothing in the record before this Court suggests that Gatlin did not enter an intelligent and voluntary guilty plea. Because Gatlin's sentence was lawful, we affirm the dismissal of Gatlin's petition for post-conviction relief.
¶ 23. THE JUDGMENT OF THE CIRCUIT COURT OF MADISON COUNTY DISMISSING THE PETITION FOR POST-CONVICTION RELIEF IS AFFIRMED. ALL COSTS OF THIS APPEAL ARE ASSESSED TO THE APPELLANT.
LEE AND MYERS, P.JJ., IRVING, GRIFFIS, ISHEE, ROBERTS AND CARLTON, JJ., CONCUR. BARNES AND MAXWELL, JJ., CONCUR IN RESULT ONLY.
NOTES
[1]  There is no evidence in the record regarding Gatlin's whereabouts from November 7, 2005, to December 1, 2006.
[2]  See 2009 Miss. S.B. 2709 § 2(2)(c) (defining custody as "... persons currently incarcerated; civilly committed; on parole or probation; or subject to sex offender registration for the period of the registration or for the first five (5) years of the registration, whichever is the shorter period)."
