
394 S.E.2d 743 (1990)
STATE of West Virginia, ex rel. William C. FORBES, Prosecuting Attorney for Kanawha County
v.
The Honorable Patsy McGRAW, Magistrate, Kanawha County Magistrate Court.
No. 19550.
Supreme Court of Appeals of West Virginia.
June 4, 1990.
*744 William C. Forbes, Pros. Atty., pro se.
Mary Beth Kershner, Asst. Pros. Atty., Charleston, for appellant.
John Krivonyak, Charleston, for Mike Schmiedicke.
Paul R. Stone, Charleston, for Dana Katherine Voelker.
WORKMAN, Justice.
In this original proceeding, the relator, the Kanawha County Prosecuting Attorney (hereinafter the State), seeks a writ of mandamus to direct Kanawha County Magistrate Patsy McGraw to reinstate the complaints in the case of State v. Booth, et al., Criminal Action Nos. 50-M-000163 to 000179 and No. 90-M-000181 and to permit the State to amend the trespass charges contained in those complaints. Alternatively, the State requests that Magistrate McGraw be directed to amend the orders which currently provide for the dismissal of these complaints with prejudice to reflect the entry of the dismissal orders without prejudice.
The complaints at issue involve charges of trespass and obstructing an officer in connection with an incident which occurred on January 6, 1990, at the Women's Health Center at 3418 Staunton Avenue, Charleston, West Virginia. On this date at about 7:00 a.m., nine individuals are alleged to have carried tires and homemade shackles into the Women's Health Center, proceeded to rearrange the furniture in the lobby, and then chained themselves together by placing the tires around their bodies and shackling their feet together. The nine individuals are alleged to have refused to comply with the requests of the Women's Health Center employees to leave the premises. When the police arrived and attempted to remove the protesters, the individuals are alleged to have joined hands, held onto the tires and shackles, and generally obstructed the arrest process. It took six officers almost one hour to remove the protestors from the premises. All nine protestors *745 were charged on that same day with trespass and obstructing an officer.
Before the trial began on January 23, 1990, before Magistrate McGraw, the State moved to amend the trespass complaints pursuant to Rule 6 of the Rules of Criminal Procedure for Magistrate Court. The trespass statute cited in the complaints was W.Va.Code § 61-3B-3 (1989). That statute pertains to trespass on property other than a structure or conveyance.[1] The State, through its motion to amend, sought to correct this error in citation by altering the statutory reference to W.Va.Code § 61-3B-2 (1989), which pertains to trespass "in, upon or under a structure or conveyance."[2] The motion to amend also included a request that the penalty on the trespass complaints be amended from "to six months and/or $100 to $500" to read "a fine of $100 only."
As grounds for its motion to amend, the State apprised the magistrate of Rule 6 of the Rules of Criminal Procedure for Magistrate Courts. That rule provides in its entirety:
(a) Amendment. Upon motion, the magistrate may permit the complaint, warrant, summons or any other document to be amended at any time before verdict if no additional or different offense is charged and if substantial rights of the defendant are not prejudiced.
(b) Harmless Error. Error in the citation of the statute or rule or regulation which the defendant is alleged to have violated, or the omission of the citation shall not be ground for dismissal or for reversal of a conviction if the error or omission did not mislead the defendant to his or her prejudice.
Instead of ruling on the motion to amend, Magistrate McGraw dismissed the trespass complaints with prejudice.
Following the dismissal of the trespass complaints, the State moved to continue the entire trial. The State then withdrew its motion for a continuance and moved for a stay of the dismissal order to allow it time to seek judicial review. Magistrate McGraw denied the motion for a stay and instructed the State to proceed on the obstruction charges. When the State declined to go forward, Magistrate McGraw dismissed the obstruction complaints with prejudice also.
In refusing to permit the State to amend the trespass complaints against the nine protestors, Magistrate McGraw clearly acted in violation of Rule 6 of the Rules of Criminal Procedure for Magistrate Courts. The motion to amend did not seek to charge the protestors with a different substantive offense as both statutes (W.Va. Code §§ 61-3B-2 and -3) are predicated on trespass violations. Accordingly, the State met the procedural prerequisite for moving to amend the trespass complaints under Rule 6. See W.Va.R.Crim.P.Magis.Cts. 6. Rule 6 provides that "[e]rror in the citation of the statute ... shall not be ground for dismissal ...," provided that the error did not prejudice the defendant.
*746 The record reflects that Magistrate McGraw determined that the defendants had been prejudiced by their one week stay in the county jail following the State's acknowledgement that the penalty associated with trespass under W.Va.Code § 61-3B-2 did not include confinement in jail. Upon examination, the argument that the trespass citation error resulted in prejudice to the protestors because of their one week incarceration fails. In addition to trespass, the protestors were also charged with obstructing an officera misdemeanor which carries the potential penalty of a fine of not less than $50 nor more than $500 and may include up to one year of incarceration. See W.Va.Code § 61-5-17 (1989). Because obstructing an officer includes jail time as part of the permissible penalty and because the obstruction charges were not subject to procedural challenge, the protestors were not improperly incarcerated. See id. Accordingly, Magistrate McGraw wrongly concluded that the prerequisite element of prejudice existed which would permit her to deny the State's motion to amend.
If a criminal defendant is charged with and detained on multiple offenses, the defendant cannot claim prejudice arising from incarceration when a statutory citation error is discovered, provided that one of the offenses with which he is charged is procedurally without defect and carries incarceration as a potential penalty. No prejudice arose from the protestors' incarceration because the obstruction charges were procedurally correct and carried independently the penalty of imprisonment. When, as in this case, a criminal defendant has not been prejudiced by an error in the citation of the statute with which he is charged, the error is harmless and shall not be ground for dismissal of the complaint. See W.Va.R.Crim.P.Magis.Cts. 6.
The fact that the obstruction charges were ultimately dismissed at trial because of the State's refusal to present its evidence on these charges is of no consequence to the issue of whether the trespass complaints should have been amended. Since the dismissal of the obstruction complaints was granted solely because the State failed to present its evidence, the dismissal does not relate back to the date of arrest. Until the dismissal occurred, the obstruction charges were pending. Accordingly, detention prior to trial was not improper given the penalty for obstructing an officer. See W.Va.Code § 61-5-17.
The State maintains that the order dismissing the obstruction charges should have been entered without prejudice as opposed to with prejudice. Magistrates are empowered by statute to dismiss actions with prejudice in some circumstances:
A magistrate may render judgment against the plaintiff dismissing his action with prejudice to a new action and awarding costs to the defendant when (a) the plaintiff fails to appear and prosecute his action at the proper time for appearance; (b) the plaintiff fails or refuses to testify when properly required to do so; or (c) the plaintiff fails to give security for costs when properly required to do so. In cases (a) and (b) if the plaintiff shows cause why his action should not have been dismissed, the magistrate may set aside such judgment and continue the matter before him or may dismiss the action without prejudice.
W.Va.Code § 50-4-12 (1986).
West Virginia Code § 50-4-12 applies to those situations when an action does not proceed to hearing or trial because of the plaintiff's[3] or State's failure to prosecute, give testimony, or provide a security bond. In those three instances, the magistrate has within her discretion the power to dismiss the complaints with prejudice. The *747 case at bar falls squarely into situation (a) anticipated by W.Va.Code § 50-4-12. Since the State refused to present its evidence on the obstruction charges, Magistrate McGraw did not abuse her discretion when she dismissed the obstruction complaints with prejudice.[4]
We do not suggest that dismissal with prejudice for failure to prosecute or testify is proper in every case. As W.Va.Code § 50-4-12 recognizes, a magistrate may abuse her discretion in dismissing an action with prejudice notwithstanding a plaintiff's failure to prosecute or testify. Accordingly, that section enables a party to move to set aside a dismissal order entered with prejudice on grounds of cause. See W.Va. Code § 50-4-12. In this case, however, because the State's witnesses and physical evidence were present in the courtroom, we do not find any basis for determining that the dismissal was improper. Moreover, the record in this case does not reflect that the State ever attempted to set aside the dismissal order on grounds of cause.
Based on the foregoing, we hereby grant a writ of mandamus instructing Kanawha County Magistrate Patsy McGraw to reinstate the trespass complaints in the case of State v. Booth, et al., and to permit the State to amend the statutory citations contained in those trespass complaints.
Writ granted as moulded.
NOTES
[1]  West Virginia Code § 61-3B-3 provides in pertinent part:

(a) Any person who knowingly and without being authorized, licensed or invited, enters or remains on any property, other than a structure or conveyance, as to which notice against entering or remaining is either given by actual communication to such person or by posting, fencing or cultivation, shall be guilty of a misdemeanor, and, upon conviction thereof, shall be fined not more than one hundred dollars.
(b) If the offender defies an order to leave, personally communicated to him by the owner, tenant or agent of such owner or tenant, or if the offender opens any door, fence or gate, and thereby exposes animals, crops or other property to waste, destruction or freedom, or causes any damage to property by such trespassing on property other than a structure or conveyance, he shall be guilty of a misdemeanor, and, upon conviction thereof, shall be fined not less than one hundred dollars nor more than five hundred dollars or imprisoned in the county jail for a period not to exceed six months, or both such fine and imprisonment.
[2]  West Virginia Code § 61-3B-2 provides in pertinent part:

Any person who knowingly enters in, upon or under a structure or conveyance without being authorized, licensed or invited, or having been authorized, licensed or invited is requested to depart by the owner, tenant or the agent of such owner or tenant, and refuses to do so, shall be guilty of a misdemeanor, and, upon conviction thereof, shall be fined not more than one hundred dollars.
[3]  Although the use of the word "plaintiff" in W.Va.Code § 50-4-12 would seem to suggest this section's applicability might be limited to the civil context, article four itself contains sections dealing with both criminal and civil law. That fact, together with the well-recognized tenet that a criminal defendant enjoys at least the same level of protection as a civil defendant, leads us to the conclusion that this section is applicable to both the civil and criminal contexts, and that the word plaintiff includes the state in criminal actions. See State ex rel. Hinkle v. Skeen, 138 W.Va. 116, 129, 75 S.E.2d 223, 230, cert. denied, 345 U.S. 967, 73 S.Ct. 954, 97 L.Ed. 1385 (1953) (quoting 5[B] Michie's Jurisprudence Criminal Procedure § 9 ("[c]riminal proceedings so far as practicable, and not repugnant thereto, always correspond to civil proceedings unless otherwise provided").
[4]  The record reflects that the State's witnesses were on site and available to testify.
