f 1.
NEUBAUER, C.J.Richard J. Scott appeals from a judgment entered upon his plea of guilty to engaging in repeated acts of sexual assault of the same child and possession of child pornography. Scott further appeals from an order denying his motion seeking plea withdrawal pursuant to Wis. Stat. Rule 809.30 (2015-16).1 Scott contends that he is entitled to withdraw his plea because he was charged with a version of engaging in repeated acts of sexual assault of the same child that no longer existed at law and there was no factual basis for his plea to possession of child pornography. We disagree but modify the judgment to reflect that Scott pleaded guilty to Wis. Stat. § 948.025(l)(e) (2007-08).
*436 Factual and Procedural Background
¶ 2. In March 2015, an information was filed charging Scott with six counts of repeated sexual assault of two girls over several years, with four counts charged as Class B felonies and two counts charged as Class C felonies, and nine counts of possession of child pornography. As relevant, count four alleged that between August 1, 2007, and August 31, 2008, he committed "repeated sexual assaults" of the same child, M.M., then five and six years old, "where fewer than three of the assaults were violations of [Wis. Stat. §] 948.02(1). . . contrary to [Wis. Stat. §§] 948.025(l)(b), 939.50(3)(c)... a Class C felony," which exposed Scott to forty years of imprisonment and a $100,000 fine. The complaint alleged that Scott first touched M.M. on the vagina when she was in kindergarten and that he touched her at least three times during that year.
f 3. The complaint, as it related to the charges of possession of child pornography, explicitly described the types of pornographic material he possessed and showed to the two girls.
¶ 4. Scott decided to enter a plea of guilty to count four and one count of possession of child pornography, as alleged in count seven, in exchange for a sentencing recommendation from the State of seven to nine years of initial confinement. The State would dismiss the remaining counts. During the colloquy, the circuit court confirmed the child's date of birth and asked if between August 1, 2007, and August 31, 2008, he touched M.M.'s vagina on at least three occasions. The court asked Scott to confirm that "on at least three occasions you touched the child with some part of your body on the vagina for the purpose of your own sexual gratification. Do you understand this charge against *437you?" Scott answered in the affirmative and stated that he was pleading guilty.
¶ 5. Regarding count seven, the court directed Scott to page four of the criminal complaint, which described the pornography Scott possessed. Scott indicated that he understood that charge and was pleading guilty. No objections were raised to the plea, and the court accepted Scott's plea.
¶ 6. A year after Scott was sentenced, he moved for plea withdrawal pursuant to Wis. Stat. Rule 809.30, arguing that his plea to count four was not a crime that existed at law and that the court lacked competence to accept a guilty plea to a crime not properly alleged. Scott contended that he was charged with engaging in repeated acts of sexual assault of the same child under Wis. Stat. § 948.025(1) (2005-06), which was repealed and recreated effective March 27, 2008, during the time when Scott engaged in the prohibited conduct. He contended that under the appropriate 2007-08 statute, there was no crime with the same elements as the 2005-06 statute under which he was charged.
¶ 7. As to count seven, Scott argued that there was no factual basis to support the allegation of knowing possession of an image that contained child pornography. The allegation that the image was on Scott's computer was inadequate to permit the inference that Scott knew he possessed the image. For example, there was no allegation in the complaint that only Scott had access to that computer.
¶ 8. The circuit court denied Scott's motion.
Engaging in Repeated Acts of Sexual Assault of the Same Child
f 9. Scott contends that he was not charged with "a crime known to law" and, thus, "the circuit court *438lacked subject matter jurisdiction to accept his guilty plea." Even if the circuit court did have subject matter jurisdiction, Scott continues, during the plea colloquy the court described the elements from the 2007-08 law, not the 2005-06 version under which he was charged, leaving Scott without an understanding of the nature of the charge to which he pled guilty. Finally, Scott claims that the facts the court mentioned during the plea — that Scott touched M.M. on the vagina on at least three occasions — took the case "wholly out of the purview of. . . [Wis. Stat.] § 948.025(l)(b) (2005-06)" because that statute required "fewer than 3 . . . violations of [Wis. Stat. §] 948.02(1)" — first-degree sexual assault — and he admitted that he committed three first-degree sexual assault violations.
¶ 10. Wisconsin Stat. § 971.26 provides that "[n]o indictment, information, complaint or warrant shall be invalid, nor shall the trial, judgment or other proceedings be affected by reason of any defect or imperfection in matters of form which do not prejudice the defendant." "The purpose of a charging document is to inform the defendant of the acts he allegedly committed and to allow him to understand the offense charged so that he can prepare a defense." State v. Flakes, 140 Wis. 2d 411, 419, 410 N.W.2d 614 (Ct. App. 1987). In determining whether a defendant suffered prejudice, a key factor "is whether the defendant had notice of the nature and cause of the accusations against him." Id. Thus, for example, if the charging document verbally describes the offense but refers to the wrong statute, the defendant nevertheless knows the charge and is not prejudiced and the error does not require reversal. Wagner v. State, 60 Wis. 2d 722, 728-29, 211 N.W.2d 449 (1973).
*439¶ 11. However, "[a] complaint which charges no offense," in other words, charges a nonexistent crime, "is jurisdictionally defective and void." Mack v. State, 93 Wis. 2d 287, 295, 286 N.W.2d 563 (1980) (citation omitted). The "defect cannot be waived by a guilty plea, the court does not have jurisdiction." Id. (citation omitted). "A complaint that charges an offense not known to law is one that omits an essential element of the crime charged as defined by statute or case law." State v. Schroeder, 224 Wis. 2d 706, 714, 593 N.W.2d 76 (Ct. App. 1999).
¶ 12. The question of whether a circuit court has subject matter jurisdiction is a legal one, which, on appeal, is reviewed independently of the circuit court. State v. Webster, 196 Wis. 2d 308, 316, 538 N.W.2d 810 (Ct. App. 1995).
f 13. We reject each iteration of Scott's attempted plea withdrawal argument, which fails to address the fact that the earlier and later version of the Class C felony offense of engaging in repeated acts of sexual assault of the same child criminalized the same conduct as it pertains to Scott. As explained below, reference to the prior statute was a technical charging error and Scott has not shown that he was prejudiced by the error. Because Scott was charged with a crime known to law, the court had subject matter jurisdiction. The circuit court's plea colloquy was not defective.
f 14. Under the 2005-06 law, a person was guilty of the Class C felony of "[e]ngaging in repeated acts of sexual assault of the same child" when he committed "3 or more violations under [Wis. Stat. §] 948.02(1) *440[first-degree sexual assault] or (2) [second-degree sexual assault] within a specified period of time involving the same child ... if fewer than 3 of the violations were violations of [§] 948.02(1)." Wis. Stat. § 948.025(l)(b) (2005-06).
f 15. Wisconsin Stat. § 948.02(l)(b) (2005-06) provided that a person was guilty of first-degree sexual assault if he had "sexual contact or sexual intercourse with a person who has not attained the age of 13 years." (Emphasis added.) Section 948.02(2) (2005-06) provided that a person was guilty of second-degree sexual assault if he had "sexual contact or sexual intercourse with a person who had not attained the age of 16 years." (Emphasis added.)
¶ 16. Under the 2007-08 law, a person was guilty of the Class C felony of "[e]ngaging in repeated acts of sexual assault of the same child" when he committed "3 or more violations under [Wis. Stat. §] 948.02(1) [first-degree sexual assault] or (2) [second-degree sexual assault] within a specified period of time involving the same child ... if at least 3 of the violations were violations of [§] 948.02(1) or (2)." Wis. Stat. § 948.025(l)(e) (2007-08) (emphasis added).
¶ 17. The definition of first-degree sexual assault was changed with the 2007-08 law, but for our purposes, it included "sexual contact with a person who has not attained the age of 13 years." Wis. Stat. § 948.02(l)(e) (2007-08) (emphasis added). Second-degree sexual assault was defined as "sexual contact or sexual intercourse with a person who has not attained the age of 16 years." Sec. 948.02(2) (2007-08) (emphasis added).
*441¶ 18. The State concedes that Scott was mistakenly charged under the 2005-06 law. The charging document alleged in count four that Scott engaged in repeated sexual assaults of the same child between August 1, 2007, and August 31, 2008. However, during that time period, Wis. Stat. § 948.025(1) (2005-06) was repealed and recreated. 2007 Wis. Act 80, § 13. The applicable law is the statute in effect when the last criminal action constituting a continuing offense occurred. State v. Ramirez, 2001 WI App 158, ¶ 17, 246 Wis. 2d 802, 633 N.W.2d 656. Thus, Scott should have been charged under the 2007-08 law.
¶ 19. Nevertheless, Scott was charged with a crime that existed at law. In fact, Class C criminal liability attached under the 2005-06 law and the 2007-08 law to the same conduct as it pertains to Scott. The only difference is how the statutes were worded. But that wording difference is immaterial as the elements, as applied to Scott's conduct, are the same.
f 20. Both statutes required that a defendant commit a combination of sexual assaults against one child, either first or second degree, which totaled at least three. A defendant could have committed two first-degree sexual assaults and one second-degree sexual assault, or vice versa, or three second-degree sexual assaults, and the defendant would have been guilty of the Class C felony of engaging in repeated acts of sexual assault of the same child.
¶ 21. Scott's argument is premised on the incorrect contention that he "could not have [committed second-degree sexual assault]" because M.M. "would not have been sixteen years old at any [time] during the period alleged in count four." Under both statutes, *442second-degree sexual assault encompasses sexual contact with a person who is under sixteen years of age and not, as Scott contends, a person who is sixteen years of age or older. Here, M.M, was five and six years of age between 2007 and 2008. Thus, she was never thirteen years of age and always under sixteen years of age.
¶ 22. Specifically, the allegations that Scott touched her vagina three times during that time period constituted three violations of Wis. Stat. § 948.02(l)(e) (2007-08), that is, first-degree sexual assault, and/or three violations of § 948.02(2) (2007-08), that is, second-degree sexual assault. In either case, whether considered first-degree sexual assaults or second-degree sexual assaults, Scott was in violation of the Class C felony of engaging in repeated acts of sexual assault of the same child, whether under Wis. Stat. § 948.025(l)(b) (2005-06) or Wis. Stat. § 948.025(l)(e) (2007-08). See State v. Moua, 215 Wis. 2d 511, 519-20, 573 N.W.2d 202 (Ct. App. 1997) (holding that second-degree sexual assault is a lesser-included offense of first-degree sexual assault because "[i]f the State proves that the child is under thirteen, a necessary element of first-degree sexual assault under § 948.02(1), then the State has proved all the elements for the offense of second-degree sexual assault, since it has proved that a child is under sixteen").
¶ 23. Thus, as to Scott, the difference between first-degree sexual assault and second-degree sexual assault is the age of the victim; under thirteen years of age in the former and under sixteen years of age in the latter. Of course, if a defendant had sexual contact with a person under the age of thirteen years, he necessarily had sexual contact with a person under the age of sixteen years.
*443¶ 24. Here, the State charged Scott with three violations of sexual assault of a child who was always under thirteen years of age and, thus, the violations were both first- and second-degree sexual assault. The decision to charge a Class C felony, rather than a Class B felony, was within the State's discretion, as was the decision to agree to Scott's plea to the single Class C count. See State v. Hooper, 101 Wis. 2d 517, 535, 305 N.W.2d 110 (1981) (noting that the charge is within the discretion of the prosecutor).
¶ 25. In short, the charging error simply made no difference. It was not as if the State charged Scott with only two sexual assaults and he had to commit a third in order to be guilty of the Class C felony of engaging in repeated acts of sexual assault. Scott does not argue that the allegations in the complaint were insufficient to support the charge of engaging in repeated sexual assault of the same child, that he was not put on notice of the charges against him, or that he was not able to mount an adequate defense. He does not argue that he was misled in any way. The technical charging error did not prejudice Scott. Since Scott was charged with a crime that existed at law, the court had subject matter jurisdiction.
¶ 26. Further, contrary to Scott's contention, the circuit court's plea colloquy was not defective. As we have discussed, Wis. Stat. §§ 948.025(l)(b) (2005-06) and 948.025(l)(e) (2007-08) both required three violations of either first- or second-degree sexual assault or some combination thereof. The circuit court asked Scott if "on at least three occasions [he] touched the child with some part of [his] body on the vagina for the purpose of [his] own sexual gratification," and he answered that he did. Scott's admission to three in*444stances of sexual contact with a child less than thirteen years of age established three violations of sexual assault, whether first- or second-degree, and thus, his violation of the Class C felony of engaging in repeated acts of sexual assault. Scott expressed that he understood the charge, which belies his claim that he entered his guilty plea without knowledge of the charge. See State v. Trochinski, 2002 WI 56, ¶ 15, 253 Wis. 2d 38, 644 N.W.2d 891.
¶ 27. Finally, the facts the circuit court mentioned to Scott during the plea colloquy — that he touched M.M.'s vagina on three occasions during the requisite time period, establishing three violations of first-degree sexual assault, or three violations of second-degree sexual assault, or some combination of both— constituted a violation of Wis. Stat. § 948.025(l)(e) (2007-08). See State v. Sutton, 2006 WI App 118, ¶ 17, 294 Wis. 2d 330, 718 N.W.2d 146.2
Possession of Child Pornography
¶ 28. Scott argues that there was an inadequate factual basis to establish that he possessed child pornography because there were insufficient allegations to support the conclusion that (1) any of the individuals in the images were under eighteen years of age, (2) Scott possessed these images, or (3) he knew the images were on "his computer."
*445¶ 29. Prior to accepting a guilty plea, the circuit court must determine that a sufficient factual basis exists for the plea, that is, that "a crime has been committed and it is probable that the defendant committed it." State v. Payette, 2008 WI App 106, ¶ 7, 313 Wis. 2d 39, 756 N.W.2d 423. A sufficient factual basis exists "if an inculpatory inference can be drawn from the complaint or facts admitted to by the defendant even though it may conflict with an exculpatory inference elsewhere in the record and the defendant later maintains that the exculpatory inference is the correct one." State v. Black, 2001 WI 31, ¶ 16, 242 Wis. 2d 126, 624 N.W.2d 363; see Sutton, 294 Wis. 2d 330, ¶ 17 ("Generally, the factual basis for a guilty plea may be established by reference to the allegations set forth in the criminal complaint."). An inference of guilt need not be established beyond a reasonable doubt. Payette, 313 Wis. 2d 39, ¶ 7.
¶ 30. The failure to establish a sufficient factual basis for a guilty plea is one type of manifest injustice that justifies plea withdrawal. State v. Johnson, 207 Wis. 2d 239, 244, 558 N.W.2d 375 (1997). The defendant bears the burden of showing that there was an insufficient factual basis for the plea by clear and convincing proof. Id. In reviewing a defendant's plea withdrawal motion on this basis a court may look to the "totality of the circumstances," including the plea and sentencing records. State v. Thomas, 2000 WI 13, ¶ 18, 232 Wis. 2d 714, 605 N.W.2d 836. The circuit court's decision to deny a motion for plea withdrawal is discretionary and will not be upset unless there was an erroneous exercise of discretion. Johnson, 207 Wis. 2d *446at 244. The failure to ascertain that the defendant committed the crime charged is an erroneous exercise of discretion. Id.
¶ 31. Initially, as the State correctly contends, Scott's first challenge is raised for the first time on appeal and, thus, it is not properly before this court. County of Racine v. Smith, 122 Wis. 2d 431, 438, 362 N.W.2d 439 (Ct. App. 1984).
f 32. In any event, all of Scott's challenges clearly lack merit. The complaint alleged that Scott forced M.M. to view pornographic pictures of "naked girls" and "children" with adults and that the police found on "two computers" at Scott's "home," among other things, "numerous images of child pornography" including one of "a girl, clearly under age 18," engaged in sexual contact with a male. During the plea colloquy, the circuit court read from portions of the complaint recounting in much more explicit detail than we have provided here these items that were found at Scott's home. In response, Scott indicated that he understood and that he was pleading guilty.
¶ 33. The allegations in the complaint that these pornographic materials were found at Scott's "home" and on his computer provide a sufficient factual basis to support the inference that Scott possessed these materials. Sutton, 294 Wis. 2d 330, f f 17-18.
Conclusion
¶ 34. Although there was an error in the complaint charging Scott with engaging in repeated acts of sexual assault, the technical charging error did not result in prejudice to Scott, nor did it affect the circuit *447court's subject matter jurisdiction. Further, Scott understood the charge, and the facts the court mentioned during the plea colloquy established that Scott committed the crime to which he pled, a Class C penalty conviction for engaging in repeated acts of sexual assault of the same child. Finally, there was a sufficient factual basis to establish that Scott possessed child pornography. Therefore, we modify the judgment of conviction to reflect that Scott was convicted of Wis. Stat. § 948.025(l)(e) (2007-08) and, as modified, we affirm the judgment of conviction and the order denying Scott's motion to withdraw his plea.
By the Court. — Judgment modified and, as modified, affirmed; order affirmed.
All references to the Wisconsin Statutes are to the 2015 — 16 version unless otherwise noted.
Although the judgment of conviction reflects that Scott pleaded guilty to Wis. Stat. § 948.025(l)(b) (2005-06), he actually pleaded guilty to § 948.025(l)(e) (2007-08). This is a mere defect in the form of the certificate of conviction, which we correct on appeal. State v. Prihoda, 2000 WI 123, ¶ 17, 239 Wis. 2d 244, 618 N.W.2d 857.