
313 S.W.3d 158 (2010)
Lester A. STONE, Appellant,
v.
MISSOURI DEPARTMENT OF CORRECTIONS, PROBATION & PAROLE BOARD, Respondents.
No. WD 71161.
Missouri Court of Appeals, Western District.
May 25, 2010.
Motion for Rehearing and/or Transfer to Supreme Court Denied June 29, 2010.
*159 Lester A. Stone, Mineral Point, MO, pro se.
Stephen D. Hawke, Jefferson City, MO, for Respondents.
Before THOMAS H. NEWTON, C.J., JAMES EDWARD WELSH, and GARY D. WITT, JJ.
JAMES EDWARD WELSH, Judge.
Lester A. Stone appeals the circuit court's judgment denying his petition for writ of mandamus. On appeal, he contends that he is entitled to mandamus relief because the Missouri Department of Corrections and the Missouri Board of Probation and Parole (referred to collectively as "the Department") have a clear ministerial duty to recalculate his mandatory minimum prison term pursuant to the 1994 and 1999 amended versions of section 558.019, RSMo. We affirm.
Stone committed robbery in the first degree on February 6, 1990. He was tried, convicted, and sentenced later that year. The court sentenced Stone to life imprisonment, and it found that Stone was a class X offender under section 558.019.4(3), RSMo Cum.Supp.1990. A "class X offender" was defined in section 558.019.4(3), RSMo Cum.Supp.1990, as a defendant who had "previously pleaded guilty to or ha[d] been found guilty of three felonies committed at different times." Pursuant to section 558.019.2(3), RSMo Cum.Supp.1990, the mandatory minimum prison term a class X offender had to serve was eighty percent of his sentence. Because a life sentence was calculated to be fifty years under section 558.019.4(4), RSMo Cum.Supp.1990, the Department determined that Stone's mandatory minimum prison term was eighty percent of fifty years.
In 1994, the legislature amended section 558.019 and removed the "class X offender" *160 designation from the statute. Instead of basing the mandatory minimum prison term upon previous felony convictions, the 1994 version of the statute based the mandatory minimum prison term upon the number of previous remands to the department of corrections for felonies. § 558.019.2, RSMo 1994. Additionally, for purposes of determining the mandatory minimum prison term, a life sentence under the 1994 version of the statute was reduced from fifty years to thirty years. § 558.019.4(1), RSMo 1994.
The legislature amended section 558.019 again in 1999. § 558.019, RSMo Cum.Supp. 1999. The 1999 version substituted the phrase "prison commitments" for "remands." A "prison commitment" was defined as "the receipt by the department of corrections of a defendant after sentencing." § 558.019.2, RSMo Cum.Supp.1999.
In February 2009, Stone filed a petition for writ of mandamus in the circuit court. In his petition, he asked the court to direct the Department to recalculate his mandatory minimum prison term under the 1994 and 1999 versions of section 558.019. He claimed that he had only one remand or commitment unrelated to the offense of robbery in the first degree, and therefore, under the 1994 and 1999 versions of section 558.019.2(1), his mandatory minimum prison term should be only forty percent of thirty years.
The Department moved to dismiss Stone's petition on the basis that the legislature expressly provided that the 1994 and 1999 versions of section 558.019 applied only to offenses occurring on or after August 28, 1994. The circuit court agreed with the Department and denied Stone's petition. Stone appeals.
A writ of mandamus compels "the performance of a ministerial duty that one charged with the duty has refused to perform." Furlong Cos. v. City of Kansas City, 189 S.W.3d 157, 165 (Mo. banc 2006). A petitioner seeking mandamus relief must allege and prove "a clear, unequivocal, specific right to a thing claimed." Id. at 166. "Mandamus does not issue except in cases where the ministerial duty sought to be coerced is definite, arising under conditions admitted or proved and imposed by law." Id.
Generally, when the circuit court denies a petition for writ of mandamus, the petitioner's proper course of action is not to appeal the denial but to file the writ in a higher court. Delay v. Mo. Bd. of Prob. & Parole, 174 S.W.3d 662, 664 (Mo.App. 2005). However, when the circuit court denies a petition for writ of mandamus following an answer or motion directed to the merits of the controversy and, in doing so, determines a question of fact or law, we treat the court's ruling as final and appealable. Id. Because the Department's motion to dismiss attacked the merits of Stone's petition and the court denied the petition on the merits, the denial was final and appealable. On appeal, we will affirm the circuit court's denial of Stone's petition for writ of mandamus unless we find that it is not supported by substantial evidence, it is against the weight of the evidence, or it erroneously declares or applies the law. Dade v. Mo. Bd. of Prob. & Parole, 194 S.W.3d 382, 383 (Mo.App.2006).
In his sole point on appeal, Stone contends that the circuit court erred in denying his petition for writ of mandamus because the Department has a clear ministerial duty to recalculate his mandatory minimum prison term. He claims that the legislature intended that the 1994 and 1999 versions of section 558.019 apply retrospectively to require this recalculation. We disagree.
When the legislature amended the statute in 1994, it added a new subsection that clearly expressed its intent regarding the applicability of the amendments. Section 558.019.7, RSMo 1994, states that "[t]he *161 provisions of this section shall apply only to offenses occurring on or after August 28, 1994." This subsection remained in effect when the legislature amended the statute again in 1999. § 558.019.7, RSMo Cum.Supp.1999. Thus, contrary to Stone's claim, the statute, by its own terms, does not apply retrospectively to offenses committed before August 28, 1994. State v. Harris, 908 S.W.2d 912, 916-17 (Mo.App. 1995); State v. Dean, 898 S.W.2d 704, 706-07 (Mo.App.1995).[1]
Stone committed robbery in the first degree on February 6, 1990. He was sentenced as a class X offender under section 558.019, RSMo Cum.Supp.1990, and his mandatory minimum prison term was properly calculated on that basis. The legislature's subsequent amendments to section 558.019 do not apply to Stone's mandatory minimum prison term for this offense.
Because Stone did not have a clear, unequivocal, and specific right to have his mandatory minimum prison term recalculated pursuant to the 1994 and 1999 versions of section 558.019, the circuit court properly denied his petition for writ of mandamus. We affirm the circuit court's judgment.
All concur.
NOTES
[1]  While Stone is correct that there are cases that have retrospectively applied other new or amended statutes affecting minimum prison terms and parole eligibility, the statutes at issue in those cases did not contain express statements as to the applicability of the new provisions or amendments. See, e.g., Jones v. Fife, 207 S.W.3d 614, 615, 617 (Mo. banc 2006) (sections 559.115.7 and 217.362.5, RSMo Cum.Supp.2004); State ex rel. Nixon v. Russell, 129 S.W.3d 867, 870-71 (Mo. banc 2004) (section 558.016.8, RSMo Supp.2003); Talley v. Mo. Dep't. of Corr., 210 S.W.3d 212, 215-16 (Mo.App.2006) (section 571.015, RSMo 1994). In such circumstances, the courts looked to whether section 1.160, RSMo 2000, barred the retroactive application of the new or amended laws and found that it did not. See Jones, 207 S.W.3d at 616-17; Russell, 129 S.W.3d at 870-71. Because the legislature clearly stated its intent regarding the applicability of the 1994 and 1999 amendments to section 558.019, analyzing them pursuant to section 1.160 is neither necessary nor appropriate.
