
39 S.W.3d 853 (2001)
Christopher L. SANDY, Appellant,
v.
Dora SCHRIRO, Director, Missouri Department of Corrections, Respondent.
No. WD 58844.
Missouri Court of Appeals, Western District.
March 20, 2001.
*854 Richard L. Beaver, Jefferson City, Attorney for Appellant.
Jeremiah W. (Jay) Nixon, Attorney General, Troy G. Allen and Stephen D. Hawke, Assistant Attorneys General, Jefferson City, Attorneys for Respondent.
Before LAURA DENVIR STITH, P.J., and SMART and HOWARD, JJ.
HOWARD, Judge.
Christopher L. Sandy (hereinafter "appellant") appeals from the circuit court's judgment dismissing his declaratory judgment action for failure to state a claim. He raises two points on appeal.
First, he asserts that he properly stated a claim upon which relief could be granted in alleging that: the Department of Corrections (hereinafter "respondent") was not within its authority granted by the legislature when it enacted its department policy, D5-8.1 as codified at 14 C.S.R. 10-5.010[1] (hereinafter "the policy"), under which he was denied good time credit because he was serving a life sentence; the policy violates the constitutional prohibition against ex post facto laws; and he had a right to be considered for the good time credit under § 558.041,[2] which right was denied due to respondent's unauthorized policy. Thus, he asserts dismissal was improper. In his second point, appellant asserts that the Circuit Court of St. Louis County erred in transferring venue to Cole County.
The change of venue is affirmed. However, we reverse the dismissal for failure to state a claim and remand the case to the circuit court for further proceedings consistent with this opinion.

Background
On July 3, 1986, a jury convicted appellant of second-degree murder, MO.REV.STAT. § 565.021 (Supp.1984). The court then sentenced him to life imprisonment with the possibility of parole.
In June of 1999, the Missouri Board of Probation and Parole apparently[3] granted appellant a parole release date of September 2002. § 217.690. Pursuant to § 558.041, appellant then filed an application for good time credit. Gene Stubblefield, the Superintendent of the Missouri *855 Eastern Correctional Center, denied appellant's application, stating by letter as follows:
I have received your request for Good Time Credit. In accordance with Department Policy D5-8.1, persons serving a life sentence are not eligible for Time Credit. Therefore, I am returning your packet to you.
I would be remiss if I did not acknowledge your many accomplishments during your period of incarceration. I encourage you to continue your efforts at self-growth.
In response to this denial, on October 4, 1999, appellant filed a petition in the St. Louis County Circuit Court seeking a declaratory judgment and injunctive relief. He alleged that respondent's promulgation and implementation of the policy under which his application for good time credit was denied exceeded the authority granted by the Missouri Legislature under § 558.041 and was an ex post facto policy. He sought a declaratory judgment that he was entitled to be considered for good time credit and also sought an injunction.
On January 13, 2000, respondent moved to dismiss appellant's cause for failure to state a claim for which relief could be granted. Respondent filed a motion for a change of venue, to which appellant did not respond. The case was then transferred to the Circuit Court of Cole County. Appellant responded to respondent's motion to dismiss and also moved for summary judgment while the case was still pending in the St. Louis County Circuit Court. After the case was transferred, he moved for a judgment on the pleadings and filed his supplemental response to respondent's motion to dismiss in Cole County.
On June 22, 2000, the Cole County Circuit Court entered its "Findings of Fact, Conclusions of Law, and Judgment Granting Respondent's Motion to Dismiss." The court dismissed appellant's petition for failure to state a claim upon which relief could be granted. This appeal followed.

Point IDismissal for Failure to State a Claim
Appellant's first point concerns the circuit court's dismissal of his petition.

Standard of Review
In reviewing the court's dismissal of appellant's declaratory judgment action, we deem all facts pleaded to be true, liberally construe the petition's averments, and draw all reasonable and fair inferences therefrom. Roy v. Missouri Dep't of Corr., 23 S.W.3d 738, 742 (Mo.App. W.D. 2000). We review the allegations set forth in the petition in order to determine whether principles of substantive law are invoked, which, if proved, would entitle petitioner to declaratory relief. Id. If so, then the petition is sufficient and cannot be dismissed for failure to state a claim. Id. In other words, if the petition contains facts, not mere conclusions, supporting its allegations, and those facts demonstrate a justiciable controversy, then we will reverse the court's dismissal and remand the cause to the court for a determination of the parties' rights. Id. at 742-43.

Dismissal of Declaratory Judgment Action
The facts and reasonable inferences therefrom as pled in appellant's petition are summarily set forth above. On these facts, the circuit court found in relevant part as follows:
5. To ultimately prevail, [appellant] must show that 14 CSR 10-5.010 is "unreasonable and plainly inconsistent" with § 558.041, RSMo.
6. Underlying administrative law is the concept that "administrative agencieslegislative creationspossess only those powers expressly conferred or necessarily implied by statute." Under the express language of § 558.041.3, RSMo, the Department "shall issue a policy for awarding credit." This policy is contained in 14 CSR 10-5.010.

*856 7. On careful review of § 558.041 and 14 CSR 10-5.010, it is clear that petitioner fails to state a claim for relief. In promulgating 14 CSR 10-5.010, which, in relevant part, makes those inmates with life sentences ineligible for good time credit, the Department adhered to the language and legislative intent of § 558.041, RSMo.
* * *
10. Lastly, [appellant] argues that 14 CSR 10-5.010 violates the Ex Post Facto Clause. "The ex post facto provision prohibits any law that provides for punishment for an act that was not punishable when it was committed or that imposes an additional punishment to that in effect at the time the act was committed." "Two elements are necessary for a law to be ex post facto: it must be retrospective, and it must disadvantage the affected offender."
11. [Appellant] argues that application of 14 CSR 10-5.010 "depriv[es] him of his liberty for an additional 15 months." That regulation, however, is not penal in nature. The regulation does not increase the punishment for [appellant]'s 1986 conviction: [appellant] is still sentenced to life imprisonment. As such, [appellant] is not "disadvantaged" by 14 CSR 10-5.010.
(Citations omitted.) The circuit court essentially ruled on the merits of appellant's claim in dismissing it. In so doing, the court implicitly acknowledged that appellant stated a claim in his petition. This is procedurally contradictory; i.e., the court cannot dismiss appellant's petition for failure to state a claim by finding in favor of respondent on the merits. Thus, dismissal for failure to state a claim was not appropriate. See City of St. Peters v. Concrete Holding Co., 896 S.W.2d 501, 503 (Mo.App. E.D.1995) (holding "[i]t is improper for a trial court to decide the merits of a properly pleaded declaratory relief action by dismissal").
In holding that the trial court erred in dismissing the plaintiff's petition for failure to state a claim in City of Creve Coeur v. Creve Coeur Fire Protection Dist., 355 S.W.2d 857, 859-60 (Mo. 1962), the Missouri Supreme Court explained:
[I]t is not the function of the trial court on a motion to dismiss or of this court on appeal from a judgment of dismissal to make an analysis of the law under which the rights are claimed or to construe the statutes in question or to determine on the merits whether [appellant] is entitled to [ ] declaratory relief.
Thus, in ruling on a motion to dismiss for failure to state a claim, the circuit court does not address the merits of the claim, rather, it determines whether the party seeking relief has stated a claim upon which relief can be granted.
If under the facts pleaded a plaintiff is entitled to declaration of rights at all, the petition is sufficient for that purpose even though it advances a mistaken contention of law. A plaintiff's standing to claim declaratory reliefand to assert a legally protectible interestis not impaired by the probability that ultimately he will not prevail.
City of Hannibal v. Marion County, 745 S.W.2d 842, 845 (Mo.App. E.D.1988). "The [circuit] court was not authorized to use a ruling on [respondent's] motion[ ] to dismiss as a vehicle to enter judgment on the merits." Id. at 845-46. If it is certain "there is no basis for plaintiff's contention that it is entitled to a declaration of rights and obligations by reason of the averments of its petition, the motion to dismiss should be denied and plaintiff afforded an opportunity to adduce evidence to sustain its allegations." City of Creve Coeur, 355 S.W.2d at 860.
Although appellant's motion for summary judgment and motion for judgment on the pleadings were also before the court, the court explicitly ruled that it was dismissing appellant's petition for failure to state a claim. The judgment dismissing appellant's petition for failure to state a claim addressed the merits of his claim *857 and ultimately found for respondent, thereby constituting reversible error. This is not to say that we agree or do not agree with the circuit court's conclusions of law. Instead, we hold only that the conclusions of law, on the merits, are not procedurally consistent with a dismissal for failure to state a claim. The question is not whether the petition's stated theory demonstrates an entitlement to the declaratory relief sought, "but rather it is whether under the averments of the petition plaintiff is entitled to a declaration of rights at all." City of St. Peters, 896 S.W.2d at 504.
Accordingly, we reverse the circuit court's judgment dismissing appellant's petition for failure to state a claim. Upon remand, we direct the circuit court "to permit the parties to properly submit the issue for adjudication in a manner consistent with this opinion, either by a motion for summary judgment or by [other appropriate means]." City of Hannibal, 745 S.W.2d at 846.

Point IIVenue
In appellant's second point, he claims that the Circuit Court of St. Louis County erred in granting respondent's motion for change of venue to Cole County.
Appellant filed his petition in St. Louis County. Respondent thereafter filed a motion for change of venue to Cole County, which was subsequently granted. Appellant never objected to or filed any response to appellant's motion for change of venue. Nor did he seek a writ of prohibition under Rule 97 in order to prevent the St. Louis County Circuit Court from improperly transferring the case to Cole County. In fact, after the cause was transferred to Cole County, appellant submitted his motion for judgment on the pleadings and his supplemental response to respondent's motion to dismiss directly to Cole County, never once challenging the change of venue.
Appellant contends for the first time on appeal that the court erred because venue was proper in St. Louis County under § 536.050.1. Under Missouri law, "[s]tatutes fixing venue confer a mere personal privilege which may be waived by the party entitled to assert it." Bizzell v. Kodner Dev. Corp., 700 S.W.2d 819, 822 (Mo. banc 1985). Without addressing the merits of his claim, we find that appellant waived any challenge to the change of venue.
Point II is denied.

Conclusion
We affirm the change of venue from St. Louis County to Cole County Circuit Court. However, we reverse the circuit court's judgment dismissing appellant's petition for failure to state a claim. We remand the case to the circuit court with directions to allow the issue to be properly submitted for adjudication, either by a motion for summary judgment or by other appropriate means.
LAURA DENVIR STITH, P.J., and SMART, J., concur.
NOTES
[1]  MO.CODE REGS.ANN. tit. 14, § 10-5.010 (1989).
[2]  Unless otherwise noted, all statutory references are to MO.REV.STAT. (Cum.Supp.1999).
[3]  In the record on appeal, the only information pertaining to appellant's alleged tentative parole release date is appellant's allegation to this effect in his petition.
