
149 S.W.3d 289 (2004)
In the Matter of J.M.R.
No. 03-03-00749-CV.
Court of Appeals of Texas, Austin.
October 21, 2004.
*291 Ruben V. Castaneda, Travis County Juvenile Public Defender, Austin, for Appellant.
Lisa Stewart, Assistant District Attorney, Austin, for Appellee.
Before Chief Justice LAW, Justices B.A. SMITH and PEMBERTON.

OPINION
BEA ANN SMITH, Justice.
Appellant, J.M.R., appeals the trial court's exercise of jurisdiction over this case. In his first issue, J.M.R. argues that he should have been charged with trespass on school grounds under the education code rather than criminal trespass under the penal code because the two statutes are in pari materia. Statutes are in pari materia if they touch upon the same subject, have the same general purpose, and relate to the same conduct. Cullen v. State, 832 S.W.2d 788, 792 (Tex.App.-Austin 1992, pet. ref'd). The in pari materia doctrine is a rule of statutory construction that requires such statutes to be construed together even if they do not reference each other. Id. J.M.R. contends that because the trespass on school grounds statute is subsumed by the general criminal trespass statute, the in pari materia doctrine required the State to charge him with the offense that more specifically described his conduct. He claims that a violation of the education code statute is a class C misdemeanor, thus the district court was without jurisdiction in the matter and should have granted his plea to the jurisdiction. See Tex. Educ.Code Ann. § 37.107 (West 1996); Tex. Pen.Code Ann. § 30.05 (West Supp.2004-05). In his second issue, J.M.R. contends that either the trial court abused its discretion by allowing the State to amend the petition alleging delinquent conduct, or the State's evidence was insufficient to prove up the charge because the amendment was ineffective. The trial court adjudicated J.M.R. delinquent after finding beyond a reasonable doubt that he committed criminal trespass. See Tex. Fam.Code Ann. § 51.03(a) (West 2002); Tex. Pen.Code Ann. § 30.05. We hold that penal code section 30.05 and education code section 37.107 are not in pari materia. We further hold that the amendment was ineffective because it was not filed in writing, but that the variance between the language of the petition and the facts presented at trial did not render the evidence insufficient.

BACKGROUND
On December 5, 2002, J.M.R. was officially removed from Bedicheck Middle School and enrolled in the Austin Independent School District's Alternative Learning Center (the Center). On his first day there, J.M.R. and his mother attended orientation and received a written document outlining the Center's attendance policy, dress code, academic expectations, school bus rules, and safety and security procedures. The document included a specific warning that students could not return to their former school campus and that entry onto that campus or any other school district property could result in trespassing charges being filed. J.M.R. and his mother signed and dated each section of the document acknowledging that they had read and understood the Center's rules and expectations.
On February 8, 2003, J.M.R. was discovered at Bedicheck Middle School by a school district police officer. As a result, he was charged with criminal trespass. *292 See Tex. Pen.Code Ann. § 30.05. On October 22, 2003, the trial court held a hearing on J.M.R.'s plea to the jurisdiction and motion to dismiss the original petition alleging delinquent conduct. At the hearing, J.M.R. argued that the criminal trespass statute is in pari materia with the trespass on school grounds statute, and therefore he should be prosecuted under the education code. He then asserted that because the offense of trespass on school grounds is a class C misdemeanor, the district court lacked jurisdiction, and he could not be adjudicated delinquent. See Tex. Fam.Code Ann. § 51.03(a); Tex. Const. art. 5, § 19. The district court denied J.M.R.'s plea to the jurisdiction, and the case was tried to the bench.
During its case-in-chief, the State called "Gail" Belcher, principal of Bedicheck Middle School, to testify as the owner of that school. However, the original petition alleging delinquent conduct named "Janet" Belcher as the owner of the property. After the State closed, J.M.R. moved for a directed verdict, contending that the State failed to prove ownership of the property because Janet Belcher did not testify. The trial court granted the State leave to amend the petition over J.M.R.'s objection that the amendment was untimely. The State failed to file a written amendment with the district court.
After the trial on the merits, the district court found that J.M.R. committed criminal trespass beyond a reasonable doubt and adjudicated him delinquent. J.M.R. received six months' probation.

DISCUSSION

In Pari Materia Claim

Statutes are in pari materia if they concern the same subject, relate to the same person or class of persons, or have the same object or purpose. Cheney v. State, 755 S.W.2d 123, 126 (Tex.Crim.App.1988). Statutes found to be in pari materia are construed together, and, if possible, conflicts between the statutes are harmonized. Id. at 127. In the case of an irreconcilable conflict, the specific statute controls over the more general statute.[1]Id.
The most important factor in our in pari materia analysis is similarity of object or purpose. Burke, 28 S.W.3d at 547; Alejos v. State, 555 S.W.2d 444, 450 (Tex.Crim.App.1977). To determine whether two statutes share a common purpose, we consider whether the two statutes (1) are contained in the same legislative act; (2) require the same elements of proof; (3) involve different penalties; and (4) were clearly written to achieve the same objective. Burke, 28 S.W.3d at 547-49; Segura v. State, 100 S.W.3d 652, 654 (Tex.App.-Dallas 2003, no pet.). The adventitious occurrence of like or similar phrases, or even of similar subject matter, in laws enacted for wholly different ends will not justify applying the doctrine.[2]*293 Segura, 100 S.W.3d at 654 (quoting Ex parte Wilkinson, 641 S.W.2d 927, 932 (Tex.Crim.App.1982)).
A plea to the jurisdiction challenges the trial court's authority to determine a cause of action. Bland Indep. Sch. Dist. v. Blue, 34 S.W.3d 547, 554 (Tex.2000). To invoke a court's authority, a plaintiff must allege facts that affirmatively demonstrate that the court has jurisdiction to hear the cause. Texas Dep't of Parks & Wildlife v. Miranda, 133 S.W.3d 217, 226 (Tex.2004); Texas Ass'n of Bus. v. Texas Air Control Bd., 852 S.W.2d 440, 446 (Tex.1993). To prevail on a plea to the jurisdiction, the defendant must show an incurable jurisdictional defect apparent from the face of the pleadings making it impossible for the plaintiff's petition to confer jurisdiction on the trial court. Bybee v. Fireman's Fund Ins. Co., 160 Tex. 429, 331 S.W.2d 910, 914 (1960); City of San Angelo v. Smith, 69 S.W.3d 303, 305 (Tex.App.-Austin 2002, pet. denied). Courts must consider evidence when necessary to decide jurisdictional issues. Miranda, 133 S.W.3d at 221; Texas Natural Res. Conservation Comm'n v. White, 46 S.W.3d 864, 868 (Tex.2001); Blue, 34 S.W.3d at 554-55. If the relevant evidence is undisputed or fails to raise a fact question on the jurisdictional issue, a trial court rules on the plea to the jurisdiction as a matter of law. Miranda, 133 S.W.3d at 228.
We review the denial of a plea to the jurisdiction de novo. Id.; Texas Natural Res. Conservation Comm'n v. IT-Davy, 74 S.W.3d 849, 855 (Tex.2002) (citing Mayhew v. Town of Sunnyvale, 964 S.W.2d 922, 928 (Tex.1998)). For purposes of this review, we liberally construe the pleadings in favor of jurisdiction, looking to the plaintiff's intent. Miranda, 133 S.W.3d at 226; Smith, 69 S.W.3d at 306.
In his first issue, J.M.R. asserts that the denial of his plea to the jurisdiction was improper. J.M.R. urges that (1) the offense of trespass on school grounds is in pari materia with the offense of criminal trespass, (2) the education code statute is a special or local provision that controls over the general trespass statute in the penal code, and (3) the two statutes are in irreconcilable conflict. Therefore, J.M.R. claims the State was required to prosecute him for the offense that more specifically described his conduct, trespass on school property. J.M.R. further contends that because he should have been charged with the class C misdemeanor of trespass on school grounds, the district court lacked jurisdiction.[3] We disagree.
*294 Criminal trespass is a general property offense.[4] The elements of criminal trespass are: (1) a person; (2) without effective consent; (3) enters or remains on the property, building, or aircraft of another; (4) knowingly, intentionally, or recklessly; and (5) when he had notice that entry was forbidden or received notice to depart and failed to do so. Tex. Pen.Code Ann. § 30.05(a); Bader v. State, 15 S.W.3d 599, 606 (Tex.App.-Austin 2000, pet. ref'd). A violation of this statute is a Class B misdemeanor.[5]
Section 37.107 of the education code is contained in Subchapter D, Protection of Buildings and Grounds, of Chapter 37, Discipline; Law and Order, of Subtitle G, Safe Schools. See Tex. Educ.Code Ann. § 37.107. The elements of this offense are: (1) an unauthorized person; (2) who trespasses; (3) on the grounds of any school of this state. Id. While section 37.107 does not define who an unauthorized person is, section 37.105, entitled Unauthorized Persons: Refusal of Entry, Ejection, Identification, states that entry may be denied to a person without legitimate business on school grounds and that an undesirable person may be ejected from the property if that person refuses to leave peaceably on request. See Tex. Educ.Code Ann. § 37.105 (West 1996). A violation of section 37.107 is a class C misdemeanor.
When we view the two statutes in the context of their respective codes, it becomes clear that they were not written to achieve the same objective. The criminal trespass statute is designed to protect against a knowing, intentional, or reckless entry onto the property of another. Protection of property is at the heart of the statute. However, the trespass on school grounds statute is designed to ensure, protect, or provide for the safety of those legitimately on school grounds. Although protecting school buildings and grounds from vandalism and destruction is an important goal, it does not appear to be the legislative intent here. Section 37.101 of the education code provides that the criminal laws of the state apply in the areas under the control and jurisdiction of the board of trustees of any school district of this state. Tex. Educ.Code Ann. § 37.101 (West 1996). Therefore, it appears that the legislature intended section 37.107, dealing with school grounds, to supplement rather than supersede the criminal laws. The criminal trespass and trespass on school grounds statutes effectively operate independently because their objectives are complementary: one protects a property interest, the other guards the safety of persons authorized to be on school grounds.
In addition, the two statutes are contained in different legislative acts and require different elements of proof. The criminal trespass statute requires a culpable mental state and notice that entry is forbidden, while trespassing on school grounds only requires that a person enter school property without a legitimate purpose. We believe the legislature intended to define two separate offenses, with separate elements and different levels of punishment, in order to address two distinct objectives. Thus, the statutes do not *295 share a common purpose. We hold that the two statutes are not in pari materia.[6]
In this case, the State could have elected to prosecute J.M.R. under either statute because the statutes were not in pari materia. Neither the State's election to prosecute J.M.R. for criminal trespass nor the district court's subsequent exercise of jurisdiction was error. We overrule J.M.R.'s first issue.

The Variance
In his second issue, J.M.R. contends that the trial court abused its discretion by allowing the state to orally amend the petition after the state had closed its case and J.M.R. had moved for a directed verdict of not true as a matter of law.[7] J.M.R. argues that by allowing the oral trial amendment the trial judge reshaped the nature of the trial and allowed the State to allege an entirely different offense. However, the record indicates and J.M.R. agrees, that while the trial judge did grant the State leave to amend, the petition was not actually amended because the State never filed a written amendment.[8] In the absence of an amendment, J.M.R. asserts that there is insufficient evidence indicating that he entered onto the property of Janet Belcher as alleged in the petition.
Only a material variance will render the evidence insufficient in a case involving a claim based upon a variance between the charging instrument and the evidence produced at trial. Fuller v. State, 73 S.W.3d 250, 253 (Tex.Crim.App.2002). A variance is fatal only if it is material and prejudices the defendant's substantial rights. Gollihar v. State, 46 S.W.3d 243, 257 (Tex.Crim.App.2001). To determine if a variance is material we consider whether the petition sufficiently informed the defendant of the charge against him to allow him to adequately prepare a defense and whether it would subject the defendant to the risk of being prosecuted again for the same offense. Id.
The petition sufficiently informed J.M.R. of the crime with which he was charged and allowed him to prepare an adequate defense, despite the State's failure to list the correct first name of the principal who was called to testify as the owner of the property. The record indicates that J.M.R. was aware that he was being prosecuted for criminally trespassing on Bedicheck Middle School property on or about February 8, 2003. Furthermore, the pleadings demonstrate that J.M.R. understood that the State was alleging that the principal of the school was the owner of the property. Prior to trial, the State filed two subpoenas with the district clerk, one for Janet Belcher and one for Gail Belcher. Both subpoenas stated that the person named was the principal of Bedicheck Middle School. The only difference was the first name of Ms. Belcher. Therefore, J.M.R. had notice that the principal of *296 Bedicheck Middle School would testify and that her name was either Janet or Gail. Earlier that school year while J.M.R. was a student at Bedicheck Middle School, Gail Belcher was the principal. In light of these facts, we cannot conclude that the State's clerical mistake impaired J.M.R.'s ability to prepare an adequate defense.
The variance in this case does not subject J.M.R. to the risk of being prosecuted later for the same offense. In Gollihar, the court of criminal appeals held that, in the event of a subsequent prosecution, the entire record, not just the indictment, may be referred to in protecting against double jeopardy. Id. at 258. Therefore, the variance is immaterial. We overrule J.M.R.'s second issue.

CONCLUSION
We hold that the district court correctly denied the plea to the jurisdiction because section 30.05 of the penal code and section 37.107 of the education code are not in pari materia. We further hold that the variance between the petition and proof presented at trial was immaterial. Therefore, we affirm the trial court's judgment.
NOTES
[1]  The legislature codified the in pari materia doctrine in the Code Construction Act. See Burke v. State, 28 S.W.3d 545, 547 (Tex.Crim.App.2000); Tex. Gov't Code Ann. § 311.026 (West 1998). Section 311.026 states:

(a) If a general provision conflicts with a special or local provision, the provisions shall be construed, if possible, so that effect is given to both.
(b) If the conflict between the general provision and the special or local provision is irreconcilable, the special or local provision prevails as an exception to the general provision, unless the general provision is the later enactment and the manifest intent is that the general provision prevail.
[2]  In Burke, the court of criminal appeals held that aggravated assault and intoxication assault are not in pari materia. It stated, "While they [the two statutes] could both conceivably cover the same class of persons and same result of conduct, `in object or purpose ... a clear and marked difference exists between the two provisions.'" Burke, 28 S.W.3d at 549.

In a case similar to this one, a defendant was convicted of second degree criminal mischief for poisoning and ultimately killing part of Treaty Oak, a Texas historical landmark in Austin. He argued to this Court that he should have been prosecuted under a statute prohibiting the desecration of venerated objects. We held that the statutes were not in pari materia because they had a "markedly different objective." Cullen, 832 S.W.2d at 792. The fact that the two statutes could possibly cover the same person and the same property did not by itself warrant an in pari materia construction. Id.
[3]  A class C misdemeanor is punishable by a fine not to exceed $500. Tex. Pen.Code Ann. § 12.23 (West 2003). Justice of the peace courts shall have original jurisdiction in criminal matters of misdemeanor cases punishable by fine only. Tex. Const. art. 5, § 19. However, the juvenile court will have exclusive original jurisdiction in all cases involving the delinquent conduct or conduct indicating a need for supervision engaged in by a child. Tex. Fam.Code Ann. § 51.04(a) (West 2002). Here, it is possible that J.M.R.'s conduct was neither delinquent nor indicating a need for supervision. See Tex. Fam.Code Ann. § 51.03. Therefore, it is necessary for us to determine whether the two statutes are in pari materia.
[4]  The criminal trespass statute is found in Title 7, Offenses Against Property, of the penal code. Tex. Pen.Code Ann. § 30.05.
[5]  A violation of this statute may be elevated to a class A misdemeanor if the offense is committed in a habitation, shelter center, or Superfund site, or the actor carries a deadly weapon during the commission of the offense. Tex. Pen.Code Ann. § 30.05(d).
[6]  We do not decide whether the trespass on school grounds statute is a special or local provision under government code section 311.026 because the statutes do not conflict and the statutes can be construed so that effect is given to both.
[7]  The petition charging J.M.R. with criminal trespass incorrectly listed Janet Belcher as the owner of the Bedicheck Middle School property, instead of Gail Belcher who was the school principal. At trial, Gail Belcher testified for the State to establish ownership of the property. No other evidence was introduced regarding ownership of the property.
[8]  An oral amendment at trial is insufficient to modify the pleadings. Tex.R. Civ. P. 66, 67; City of Fort Worth v. Zimlich, 29 S.W.3d 62, 73 (Tex.2000). Because we find that the petition was not effectively amended we need not address whether the trial court abused it discretion by allowing the State to orally amend the petition at the close of its case-in-chief.
