delivered the opinion of the Court.
A military judge, sitting as a general court-martial, convicted Appellant, pursuant to his pleas, of one specification of sodomy with a child under age twelve, one specification of indecent acts with a child,1 and eight specifications of indecent acts with another, violations of Articles 125 and 134, Uniform Code of Military Justice (UCMJ), 10 U.S.C. §§ 925, 934 (2006).2 A panel of members sentenced Appellant to a dishonorable discharge, confinement for a period of twenty-five years, and forfeiture of all pay and allowances.
In accordance with Appellant’s pretrial agreement, the convening authority agreed to suspend confinement in excess of twenty years for the period of confinement served plus twelve months.
Addressing an unrelated issue on appeal, the United States Navy-Marine Corps Court of Criminal Appeals (NMCCA) set aside the findings of guilty and dismissed Specifications 6, 7, and 8 of Charge III as legally insufficient. United States v. Ballan, No. NMCCA 201000242, slip op. at 3, 5 (N.M.Ct.Crim.App. Jan. 27, 2011). The NMCCA reassessed Appellant’s sentence, but found that the members would have nevertheless imposed the same sentence.3 Id. at 4.
Consistent with our decision in United States v. Wilkins, 29 M.J. 421 (C.M.A 1990), we hold that action by the convening authority showing an intent to refer a particular charge to trial is sufficient to satisfy the jurisdictional requirements of the Rules for Courts-Martial (R.C.M.). Further, we hold that while it is error to fail to allege the terminal element of Article 134, UCMJ, expressly or by necessary implication, in the context of a guilty plea, where the error is alleged for the first time on appeal, whether there is a remedy for the error will depend on whether the error has prejudiced the substantial rights of the accused. See Article 59, UCMJ, 10 U.S.C. § 859 (2006).
I. FACTUAL BACKGROUND
The Naval Criminal Investigative Service (NCIS) began investigating Appellant in 2008 when his three biological children — all living separately in foster homes at the time — were observed exhibiting age-inappropriate sexual *31behavior. Pursuant to this investigation, NCIS interviewed Appellant on July 9, 2008. During this and a subsequent interview, Appellant admitted that he had engaged in a variety of sexual misconduct with, and in the presence of, his children — all of whom were under age twelve at the time of the events. The exact nature of the conduct is not relevant to either of the specified issues now under consideration.
On April 22, 2009, the Government preferred the following charges against Appellant: one specification of rape of a child, in violation of Article 120, UCMJ, 10 U.S.C. § 920, one specification of sodomy with a child under age twelve, in violation of Article 125, UCMJ, and eight specifications of indecent acts or liberties with a child, in violation of Article 134, UCMJ. As preferred, none of the specifications of indecent acts or liberties with a child contained the terminal element for Article 134, UCMJ.
On June 5, 2009, Appellant and his defense counsel signed a valid unconditional waiver of investigation under Article 32, UCMJ, 10 U.S.C. § 832 (2006). A month later, on July 6, 2009, Appellant and his defense counsel signed a two-part Memorandum of Pretrial Agreement. With regard to Charge I — alleging a single specification of rape of a child, in violation of Article 120, UCMJ — Appellant agreed to plead “NOT GUILTY [to the Article 120, UCMJ, violation], but GUILTY to the LIO [Lesser Included Offense] of indecent acts with a child,” in violation of Article 134, UCMJ. Neither the original Charge I specification nor the specification to which Appellant agreed to plead guilty included the terminal element for Article 134, UCMJ. Appellant also agreed to plead guilty to the Article 125, UCMJ, violation essentially as charged and, for the eight specifications of indecent acts with a child in Charge III, to the lesser included offense (LIO) of indecent acts with another, both violations of Article 134, UCMJ. The Charge III specifications in the pretrial agreement again failed to allege the terminal element for Article 134, UCMJ.
On July 10, 2009, the Staff Judge Advocate (SJA) sent the convening authority a memorandum regarding the charges pending against Appellant and attached, inter alia, the original charge sheet and Appellant’s signed Memorandum of Pretrial Agreement. In this memorandum, the SJA first noted that Appellant had agreed “to plead guilty to 1 specification of Article 125, UCMJ, and 9 specifications of Article 134, UCMJ” and then recommended that the convening authority “refer the charges and specifications to general court-martial.” That same day, the convening authority referred the charges originally preferred against Appellant to the court-martial that he had ordered to be convened on March 18, 2009, and approved both parts of the pretrial agreement.
Prior to the court-martial, the parties submitted a stipulation of fact, which described the elements and underlying facts of each charge and specification. The stipulation’s explanation of the offenses to which Appellant was pleading guilty included an acknowl-edgement that his conduct was prejudicial to good order and discipline and of a nature to bring discredit upon the armed forces. During Appellant’s plea inquiry, the military judge explained each of the elements, including the terminal element, of the Charge I specification of indecent acts with a child, in violation of Article 134, UCMJ. The military judge verified that “these elements correctly describe[d]” Appellant’s conduct, and Appellant described the conduct in his own words. The military judge then asked Appellant, “[W]ere these acts prejudicial to good order and discipline or service discrediting, or both in your opinion?” Appellant responded that they were “[sjervice discrediting,” and explained why he believed this to be true.
The military judge repeated the same plea inquiry for each of the eight Article 134, UCMJ, specifications in Charge III: the military judge explained the elements, had Appellant describe the underlying conduct, and then asked Appellant whether — and if so, how — his actions were service discrediting or prejudicial to good order and discipline. For each of the eight specifications, Appellant explained how his conduct was service discrediting.
*32II. ISSUE II: THE CHARGED ARTICLE 120, UCMJ, OFFENSE
“We review jurisdictional questions de novo.” United States v. Alexander, 61 M.J. 266, 269 (C.A.A.F.2005). “A jurisdictional defect goes to the underlying authority of a court to hear a case ... [hjowever, where an error is procedural rather than jurisdictional in nature we test for material prejudice to a substantial right to determine whether relief is warranted.” Id. (citing Article 59(a), UCMJ; United States v. Morgan, 57 M.J. 119, 122 (C.A.A.F.2002)).
Appellant alleges that the court-martial lacked jurisdiction over the Charge I, Article 134, UCMJ, indecent acts with a child offense to which he pleaded guilty because this offense is not in fact an LIO of the Article 120, UCMJ, offense that was referred to court-martial by the convening authority. Under R.C.M. 201(b)(3), “[ejach charge before the court-martial must be referred to it by competent authority.” R.C.M. 601(a) defines referral as “the order of a convening authority that charges against an accused will be tried by a specified court-martial.”
That indecent acts with a child is not an LIO of rape of a child is easily determined by reference to settled case law, given that the offenses at issue are the same ones discussed in United States v. Jones—albeit with a child victim rather than an adult. 68 M.J. 465, 473 (C.A.A.F.2010) (applying the elements test and holding that “the elements of rape do not include all (or indeed any) of the elements of indecent acts”). We disagree, however, that the Article 134, UCMJ, indecent acts with a child offense to which Appellant pleaded guilty was not itself referred to the court-martial, in which case its status as an LIO for purposes of referral has no bearing on jurisdiction over that offense in this case.
The law is well settled that “[a]l-though the [referral] order is a jurisdictional prerequisite, the form of the order is not jurisdictional.” Wilkins, 29 M.J. at 424. Here, as in Wilkins, the convening authority referred one offense to court-martial on the charge sheet, but entered into a pretrial agreement whereby he agreed to accept a plea of guilty from Appellant to a different charge that was also not an LIO of the original charge. See id. at 422. The holding in Wilkins as to whether a court-martial has jurisdiction over the latter offense is directly on point here: “[i]mplicit” in the convening authority’s entry into a pretrial agreement that provided for a plea of guilty to the charge and specification of indecent acts with another, in violation of Article 134, UCMJ, “was his personal decision that the ... charge be referred to the general court-martial. ...” See id. at 424. We held in Wilkins, and reiterate today, that the convening authority’s entry into the pretrial agreement was the “functional equivalent” of a referral order and that it satisfied R.C.M. 201(b)(3). See id.
Changing the charge from a violation of Article 120, UCMJ, to a violation of Article 134, UCMJ, was, admittedly, a major change. See R.C.M. 603(a). And R.C.M. 603(d) provides that major “[c]hanges or amendments to charges or specifications ... may not be made over the objection of the accused unless the charge or specification affected is preferred anew.” Here, however, Appellant not only did not object to the change, he proposed the change in his pretrial agreement, explained to the military judge why he was guilty before the plea was accepted, and benefited from the amendment. Therefore, as in Wilkins, we consider Appellant’s actions as agreeing to an amendment to the charge and specification, even though the charge sheet itself was not physically amended. See 29 M.J. at 424 (noting that an appellant can waive both the SJA opinion required by Article 34, UCMJ, 10 U.S.C. § 834 (2006), and the “swearing to the charges against him, as long as it was clear what charges were to be considered by the court-martial” (citing R.C.M. 608(d))); see also United States v. Morton, 69 M.J. 12, 16 (C.A.A.F.2010); Jones, 68 M.J. at 473.
We conclude that Appellant pleaded guilty to a charge and specification of indecent acts with a child, which, by virtue of his pretrial agreement, was referred to court-martial and *33which he agreed to have considered by the court-martial. And yet, even as referred in the pretrial agreement, the specification did not allege the terminal element of the Article 134, UCMJ, offense. Since it shares this deficiency with the other Article 134, UCMJ, offenses in this case, that issue will be treated in the next section.
III. ISSUE I: THE ARTICLE 134, UCMJ, OFFENSES
Whether a specification is defective and the remedy for such error are questions of law, which we review de novo. See United States v. Crafter, 64 M.J. 209, 211 (C.A.A.F. 2006); see also United States v. Girouard, 70 M.J. 5, 10 (C.A.A.F.2011) (determining the appropriate remedial standard by means of a de novo review of the rights at stake).
A. Defective Article 1%, UCMJ, Specifications
In United States v. Fosler, we provided a synopsis of this Court’s jurisprudence on sufficiency of indictments and the doctrine of LIOs. 70 M.J. 225, 229-34 (C.A.A.F.2011). We held that, in a contested case, the terminal element of Article 134, UCMJ, could not be implied from language in a specification alleging that the appellant had “wrongfully” committed adultery in violation of Article 134, UCMJ. Id. at 234. In coming to this conclusion, we rejected the argument that the Supreme Court’s decision in Parker v. Levy, 417 U.S. 733, 94 S.Ct. 2547, 41 L.Ed.2d 439 (1974) (upholding the constitutionality of Article 134, UCMJ, in part on the basis of its unique history in the military), allowed the Court to imply the terminal element where it had not been alleged. Fosler, 70 M.J. at 232. Reviewing “the charge and specification more narrowly than we might at later stages,” we determined that the phrase “Article 134” did not allege the terminal element expressly or by necessary implication. Id. This decision is consonant with United States v. Miller, 67 M.J. 385 (C.A.A.F.2009), which rejected both the doctrine of “implied elements,” and the corollary notion that the terminal element of “prejudicial to good order and discipline” or service discrediting was “inherent” in every enumerated offense. See id. at 388-89.
Thus, whether specifications for charged violations of Article 134, UCMJ, may be upheld in the guilty plea context where the terminal element is not alleged cannot be answered by determining that the act that an accused “did or failed to do,” MCM pt. IV, para. 60.b.(1), is inherently, impliedly, or as a matter of common sense, prejudicial to good order and discipline or service discrediting. See Jones, 68 M.J. at 471 (overruling prior precedent, which allowed the terminal element of Article 134, UCMJ, to be implied from the offense charged); Miller, 67 M.J. at 389 (overruling prior precedent, which held “that clauses 1 and 2 of Article 134, UCMJ, are per se included in every enumerated offense”).
While in the case of a guilty plea where the appellant raises the validity of a specification for the first time on appeal, the Court “view[s] [the] specification[ ] with maximum liberality,” United States v. Bryant, 30 M.J. 72, 73 (C.M.A.1990); see also United States v. Watkins, 21 M.J. 208, 209 (C.M.A. 1986), such construction still does not permit us to “necessarily imply” a separate and distinct element from nothing beyond allegations of the act or failure to act itself. We emphasize yet again that the terminal element, which may be charged in three different ways, is an actual and distinct element of an Article 134, UCMJ, offense. See, e.g., Fosler, 70 M.J. at 228-30; United States v. Medina, 66 M.J. 21, 24-26 (C.A.A.F.2008). As such, the terminal element of Article 134, UCMJ, like any element of any criminal offense, must be separately charged and proven. See, e.g., Jones v. United States, 526 U.S. 227, 232, 119 S.Ct. 1215, 143 L.Ed.2d 311 (1999) (noting that any fact that is an element of an offense “must be charged in the indictment, submitted to a jury, and proven by the Government beyond a reasonable doubt”); Schmuck v. United States, 489 U.S. 705, 718, 109 S.Ct. 1443, 103 L.Ed.2d 734 (1989); see also United States v. Denmon, 483 F.2d 1093, 1096 (8th Cir.1973) (“heartily applauding] the salutory trend in recent years to simplify the indictment,” but *34noting that it “cannot go so far in economy of words as to approve the omission in an indictment of essential elements of an offense”). Consequently, a violation of any of the three clauses of Article 134, UCMJ, “does not necessarily lead to a violation of the other clauses,” Fosler, 70 M.J. at 230, and the principle of fair notice requires that an accused know to which clause he is pleading guilty, Medina, 66 M.J. at 26, and against which clause or clauses he must defend, Fosler, 70 M.J. at 230. We therefore hold that regardless of context, it is error to fail to allege the terminal element of Article 134, UCMJ, expressly or by necessary implication.
B. Plain Error Review and Remedies
As charged in this case, none of the specifications alleging violations of Article 134, UCMJ, to which Appellant pleaded guilty, alleged clause 1 or 2 of the terminal element of Article 134, UCMJ, which is error.4 See R.C.M. 307(c)(3). Error alone does not, however, warrant dismissal. While the rules state that a charge or specification that fails to state an offense should be dismissed, R.C.M. 907(b)(1), a charge that is defective because it fails to allege an element of an offense, if not raised at trial, is tested for plain error.5 See, e.g., United States v. Cotton, 535 U.S. 625, 631-32, 122 S.Ct. 1781, 152 L.Ed.2d 860 (2002) (rejecting precedent that defects in the indictment are jurisdictional and applying plain error review); United States v. Sinks, 473 F.3d 1315, 1320-21 (10th Cir.2007) (affirming that failure to allege an element of a crime does not affect a court’s subject matter jurisdiction, but stating that plain not harmless error review applies). In Fosler — a contested case where the appellant objected — we dismissed the charge. 70 M.J. at 226. In Girouard—a contested case with no objection where the specification of which the appellant was convicted was not an LIO of the charged offense and did not allege all of the elements — we applied plain error review and tested for prejudice.6 70 M.J. at 11-12. However, neither of those eases involved a guilty plea, and thus they did not address prejudice or the ramifications of a guilty plea in the unique context of the military justice system.
C. Prejudice and the Plea Inquiry
In our view, in the context of a specification that was legally sufficient at the time of trial and to which a plea of guilty was entered and accepted, the real question is whether we will find prejudice and disturb the providence of a plea where the providence inquiry clearly delineates each element of the offense and shows that the appellant understood “to what offense and under what legal theory [he was] pleading guilty,” Medina, 66 M.J. at 26.7 We answer this question in the negative.
*35“[A] counseled plea of guilty is an admission of factual guilt so reliable that, where voluntary and intelligent, it quite validly removes the issue of factual guilt from the case.” Menna v. New York, 423 U.S. 61, 62 n. 2, 96 S.Ct. 241, 46 L.Ed.2d 195 (1975). Nonetheless, a military judge may not accept a plea of guilty until “the elements of each offense charged [have] been explained to the accused” and unless the military judge has questioned the accused to ensure that he understands and agrees that “the acts or the omissions ... constitute the offense or offenses to which he is pleading guilty.” United States v. Care, 18 C.M.A. 535, 541, 40 C.M.R. 247, 253, 1969 WL 6059 (1969); see also R.C.M. 910(d)-(h).
The guilty plea process within the military justice system thus ensures that an appellant has notice of the offense of which he may be convicted and all elements thereof before his plea is accepted and, moreover, protects him against double jeopardy.8 See Russell v. United States, 369 U.S. 749, 763, 82 S.Ct. 1038, 8 L.Ed.2d 240 (1962); see also United States v. Resendiz-Ponce, 549 U.S. 102, 108, 127 S.Ct. 782, 166 L.Ed.2d 591 (2007) (citing Hamling v. United States, 418 U.S. 87, 117, 94 S.Ct. 2887, 41 L.Ed.2d 590 (1974)). This is illustrated by the providence inquiry in the present case.
During the plea colloquy, the military judge described clauses 1 and 2 of the terminal element of Article 134, UCMJ, for each specification. And the record “conspicuously reflects] that the accused ‘clearly understood the nature of the prohibited conduct’ as being in violation of clause 1 [or] clause 2, Article 134....” Medina, 66 M.J. at 28 (quoting United States v. Martinelli, 62 M.J. 52, 67 (C.A.A.F.2005), and comparing it to United States v. Mason, 60 M.J. 15, 19 (C.A.A.F.2004)); see also R.C.M. 910(c)(1) Discussion. We have no doubt that Appellant understood both what he was being charged with and why his conduct was prohibited.
After this, in order to have the military judge accept his pleas of guilty to the Article 134, UCMJ, specifications, Appellant was required to admit that his actions violated either clause 1 or 2 of the terminal element of that offense, and he did in fact admit that his actions were service discrediting. While this same service discrediting admission in Medina was superfluous, 66 M.J. at 28, Appellant’s admissions that his acts were service discrediting were necessary in order for the military judge to accept Appellant’s guilty pleas. See Care, 18 C.M.A. at 541, 40 C.M.R. at 253. As such, Appellant, unlike the appellant in Medina, “kn[ew] under what clause he [was] pleading guilty” and “clearly understood the nature of the prohibited conduct as being in violation of ... clause 2, Article 134....” See 66 M.J. at 28 (quoting Martinelli, 62 M.J. at 67) (quotation marks omitted).
There was no prejudice to the substantial rights of Appellant; this ease, involving a defective specification and a proper plea inquiry, is distinguishable from a contested case involving a defective specification. In cases like this one, any notice issues or potential for prejudice are cured while there is still ample opportunity either for a change in tactics or for the accused to withdraw from the plea completely — not to mention that the military judge must, sua sponte, enter a not guilty plea to the affected charge and specification where he has found a plea improvident. See R.C.M. 910(h)(1) (allowing an accused to withdraw a plea of guilty); R.C.M. 910(h)(2) (requiring the military judge to enter a plea of not guilty when the accused *36makes statements inconsistent with a guilty plea). In a contested case, on the other hand, there is no equivalent, timely cure that would necessarily be present in every properly conducted court-martial.9
In sum, while it was error in a retroactive sense to accept a plea of guilty to an Article 134, UCMJ, charge and specification, which did not explicitly or by necessary implication contain the terminal element, under the facts of this case, the showing of error alone is insufficient to show prejudice to a substantial right. See Puckett v. United States, 556 U.S. 129, 142, 129 S.Ct. 1423, 173 L.Ed.2d 266 (2009) (finding that the mere showing of error cannot be “recast[]” as the effect on substantial rights).
IV. DECISION
The decision of the United States Navy-Marine Corps Court of Criminal Appeals is affirmed.
. Relevant to Specified Issue II, Appellant was charged with rape of a child, in violation of Article 120, UCMJ, 10 U.S.C. § 920 (2006), not indecent acts with a child, a violation, at the time, of Article 134, UCMJ, see Manual for Courts-Martial, United States, Punitive Articles Applicable to Sexual Assault Offenses Committed Prior to 1 October 2007 app. 27 at A27-3 (2008 ed.) (MCM).
. Appellant was properly tried and convicted under the pertinent provisions of the UCMJ and MCM as in effect prior to the October 1, 2007, effective date of the amendments to the UCMJ and MCM made by the National Defense Authorization Act for Fiscal Year 2006, Pub.L. No. 109-163, § 552, 119 Stat. 3136, 3256-63 (2006).
. Appellant submitted a petition for a grant of review with no assignment of error, and, on June 2, 2011, this Court specified the following two issues:
I. WHETHER AN ARTICLE 134 CLAUSE 1 OR 2 SPECIFICATION THAT FAILS TO EXPRESSLY ALLEGE EITHER POTENTIAL TERMINAL ELEMENT STATES AN OFFENSE UNDER THE SUPREME COURT’S HOLDINGS IN UNITED STATES v. RESEN-DIZ-PONCE AND RUSSELL v. UNITED STATES, AND THIS COURT’S RECENT OPINIONS IN MEDINA, MILLER, AND JONES.
II. ALTHOUGH THE CRIME OF INDECENT ACTS WITH A CHILD TO WHICH APPELLANT PLEADED GUILTY WAS NOT A LESSER INCLUDED OFFENSE OF THE CHARGED CRIME OF RAPE OF A CHILD AND THUS HAD NOT BEEN FORMALLY REFERRED TO TRIAL BY COURT-MARTIAL BY THE CONVENING AUTHORITY, WHETHER APPELLANT WAIVED SUCH IRREGULARITY BY PLEADING GUILTY UNDER A PRETRIAL AGREEMENT TO INDECENT ACTS WITH A CHILD IN VIOLATION OF ARTICLE 134, WHERE NEITHER THE PRETRIAL AGREEMENT NOR APPELLANT’S PLEA AT ARRAIGNMENT EXPRESSLY SET FORTH EITHER POTENTIAL TERMINAL ELEMENT FOR AN ARTICLE 134 CLAUSE 1 OR 2 SPECIFICATION, BUT BOTH ELEMENTS WERE DISCUSSED AND ADMITTED DURING THE PROVIDENCE INQUIRY.
. The Article 134, UCMJ, specifications in this case were legally sufficient at the time of trial and are problematic today only because of intervening changes in the law. See, e.g., United States v. Mayo, 12 M.J. 286, 293-94 (C.M.A.1982) (holding that the clause 1 terminal element of Article 134, UCMJ, need not be alleged in the specification), overruled by Fosler, 70 M.J. at 232.
. The Committee on Rules of Practice and Procedure is currently seeking comments on the Preliminary Draft of Proposed Amendments to the Federal Rules of Criminal Procedure, which seeks to clarify "which motions must be raised before trial,” and addresses the "consequences of an untimely motion.” The proposed rule, in relevant part, states:
If a parly does not meet the deadline ... for making a Rule 12(b)(3) motion, the motion is untimely. In such a case, Rule 52 does not apply, but a court may consider the defense, objection, or request if:
(A) the party shows cause and prejudice; or
(B) the defense or objection is failure to state an offense or double jeopardy, and the party shows prejudice only.
Memorandum from the Advisory Comm, on Fed. Rules of Crim. Procedure to the Standing Comm, on Rules of Practice and Procedure (May 12, 2011), http://www.uscourts.gov/uscourts/Rules AndPolicies/rules/Publication% 20Aug% 202011/ CR_May_2011.pdf.
. "In the context of a plain error analysis, Appellant has the burden of demonstrating: (1) there was error; (2) the error was plain or obvious; and (3) the error materially prejudiced a substantial right of the accused.” Girouard, 70 M.J. at 11.
. The notice problem highlighted in Fosler, where the appellant could not know which theory of criminality he needed to defend against, and in Medina, where the appellant’s providence inquiry failed to inform him that nothing in the *35charged specification, which alleged a violation of a federal statute, required him to admit guilt to clause 2 or Article 134, UCMJ, which was not alleged, are not present in this case. See Fosler, 70 M.J. at 230; Medina, 66 M.J. at 26.
. And it is both notice as to the offense and an affirmative agreement to be convicted of the charge, which distinguishes a defective specification in the guilty plea context from a defective specification or conviction of an uncharged offense in a contested case. See Girouard, 70 M.J. at 10 (discussing the Fifth Amendment right to “due process of law” and the Sixth Amendment right to "be informed of the nature and cause of the accusation”) (quotation marks omitted). Nonetheless, absent objection, in either context the error is tested for prejudice. See Cotton, 535 U.S. at 631-32, 122 S.Ct. 1781; Girouard, 70 M.J. at 11-12.
. Which does not, of course, account for the Government’s ability to timely make a major change to the charge sheet under R.C.M. 603(a), absent defense objection, or to withdraw and re-refer a defective specification. See United States v. Parker, 59 M.J. 195, 201 (C.A.A.F.2003) (noting that the government can address a "disconnect between pleading and proof through withdrawal of the[] charges and preferral of new charges”); R.C.M. 603(d) (allowing for re-referral of charges after a major change to which the appellant has objected); see also R.C.M. 604(b) (allowing for charges withdrawn before the introduction of evidence to be referred to another court-martial).