Sec. 5. (a) When it appears, at any time before verdict or finding, that the prosecution was brought in an improper county, the court shall order that all papers and proceedings be certified and transferred to a court with jurisdiction over the offense in the proper county and, when necessary, order the sheriff to deliver custody of the defendant to the sheriff of the proper county.
(b) When it appears at any time before verdict or finding, that a mistake has been made in charging the proper offense, or that the defendant is guilty of an offense not charged, such defendant shall not be discharged, if the court finds probable cause that the defendant committed an offense.
(c) When it appears at any time before verdict or finding that the prosecution was brought in a court without jurisdiction over the subject matter of the offense charged, the court shall order that all the papers and proceedings be certified and transferred to a court with jurisdiction over the subject matter in the proper county.
(d) When a jury has been impaneled or the cause submitted in any case contemplated in subsection (a), (b), or (c), such jury may be discharged or submission set aside without prejudice to the prosecution.
As added by Acts 1981, P.L.298, SEC.1.