Petitioner contends first that the Court of Common Pleas of Franklin County was without jurisdiction to remand him to the custody of the sheriff of Montgomery County to await further proceedings by the court of such county.
Habeas corpus is directed only to the present confinement of a petitioner, and the granting of relief therein operates only to release him from such confinement, it does not act as an absolute discharge from the legal consequences of a crime. Thus, where a prisoner’s present confinement is found illegal because of jurisdictional error in his trial warranting the granting of relief in habeas corpus, the court granting such relief, if there is sufficient justification for the prisoner’s retention, may remand him to the custody of proper authorities for further proceedings under the indictment or to cure defects in his sentence. In re Henry, 162 Ohio St., 62; In re Knight, 144 Ohio St., 257; Mahler v. Eby, Inspector, 264 U. S., 32; and 25 American Jurisprudence, 249, Habeas Corpus, Section 153 et seq.
In view of the facts in the present case, the action of the trial court in remanding petitioner to the custody of the Montgomery County authorities was proper.
Next, petitioner urges that having been released in habeas corpus he cannot be tried again for the same offense. In other words, he is alleging former jeopardy.
In the present instance petitioner on his arraignment pleaded guilty to the indictment. Subsequently, on his own motion, such proceedings were held invalid for the failure to comply with the provisions of Section 2941.49, Revised Code. The proceedings having been held invalid, jeopardy did not attach. A plea of former jeopardy cannot be based on a void judgment, especially where the accused himself set in motion the proceedings which nullified the judgment. 1 Wharton’s Criminal Law and Procedure, 310, Section 139. In such cases the defendant estops himself from raising such defense.
The accused in a case where a release has been granted by *563way of habeas corpus would be in no different position from one where he had secured a reversal of his conviction on appeal. It is well established that a retrial for the same offense after a reversal of the prior conviction on appeal does not constitute a violation of the constitutional provision prohibiting double jeopardy. See Sutcliffe v. State, 18 Ohio, 469.
The retrial after a release in habeas corpus did not place petitioner in double jeopardy. In re Knight, 144 Ohio St., 257.
Irrespective, however, of the validity of petitioner’s argument, it is one which cannot be raised in a habeas corpus proceeding.
The plea of former jeopardy is a matter of defense which does not go to the jurisdiction of the court but to the judgment and sentence. It must be raised in the first instance in the trial-court or it is waived. Such issue may be considered in an appeal but is not cognizable in a habeas corpus proceeding. Birns v. Sweeney, 154 Ohio St., 137, and Ex parte Van Hagan, 25 Ohio St., 426.
The petitioner has made no showing that he has been deprived of any of his constitutional rights or that there was any lack of jurisdiction of the trial court over either his person or the subject matter of the offense with which he was charged.
Petitioner remanded to custody.
Weygandt, C. J., Zimmerman, Taet, Matthias, Bell-and O’Neill, JJ., concur. Herbert, J., not participating.