
44 Cal.2d 241 (1955)
In re WARREN E. BARTGES, on Habeas Corpus.
Crim. No. 5643. 
Supreme Court of California. In Bank.  
Apr. 6, 1955.
 Lowell Lyons for Petitioner.
 S. Ernest Roll, District Attorney (Los Angeles), Jere J. Sullivan and Robert Wheeler, Deputy District Attorneys, for Respondent.
 SCHAUER, J.
 In this habeas corpus proceeding the ultimate question is whether the District Court of Appeal, after modifying consecutive sentence judgments in two consolidated criminal cases by striking out findings of two prior convictions, has power to itself implicitly determine upon the changed record whether probation shall be granted or denied and whether the sentences shall run cumulatively or concurrently, or must remand the cause to the trial court for such determinations and appropriate proceedings. We conclude that petitioner is entitled to the writ, not to be discharged from custody of the sheriff but to be produced in the superior court for proceedings appropriate to the state of the record as hereinafter explained.
 Petitioner was convicted of one count of grand theft and one count of forgery and it was found that he had suffered three prior convictions of felony. Probation was denied; the judgments which were thereupon entered recited the three prior convictions and ordered that the sentences run consecutively. Defendant appealed and the District Court of Appeal affirmed the judgments in People v. Bartges (1954), 126 Cal.App.2d 763, 776 [273 P.2d 49], holding in substance, inter alia, that "Since appellant was shown to have been convicted of at least three prior felonies" it could not be said that the trial court abused its discretion in denying probation and in ordering that the sentences run consecutively. There was no petition for rehearing or for a hearing in this court, and the judgment of the District Court of Appeal became final.
 After petitioner had filed the petition for habeas corpus which is now before this court, the District Court of Appeal recalled its remittitur and modified the trial court's judgments to recite only one prior conviction. However, it did not remand the cause for determination by the trial court as to whether upon the changed record probation should be granted or denied, and whether, if reimposed, the sentences should run concurrently or consecutively, and for resentencing, if and as appropriate. Instead, the District Court of Appeal affirmed the judgments as modified by it. (People v. Bartges (1954), 128 Cal.App.2d 496 [275 P.2d 518].) *244
 Petitioner (subject to bail as fixed by the superior court) is in the custody of the sheriff of Los Angeles County and stay of execution has been granted by the superior court "to the time when the application to the State Supreme Court has been determined and to the time within which an appeal to the United States Supreme Court may be perfected."
 Petitioner complains that the trial court's determination that his sentences should run consecutively rather than concurrently was based on its mistaken belief as to the number of prior convictions which he has suffered. The record supports this contention to the extent and for the reasons hereinafter stated. Petitioner further contends that the trial court violated due process by upholding the refusal of a witness, called by petitioner, to testify on the ground that he might incriminate himself (U.S. Const., Amendment V; Cal. Const., art. I,  13; Code Civ. Proc.,  2065). This contention was correctly disposed of on petitioner's appeal from the judgments of conviction (People v. Bartges (1954), supra, 126 Cal.App.2d 763).
 The judgments of conviction recited that "the Court ... found allegations of prior convictions ... true, to-wit: Arson, a felony [in Oregon in 1932] ...; Larceny and Larceny by Bailee, felonies [in Oregon in 1941], ... Grand Theft, a felony [in Arizona in 1949]," with service of terms in the respective state prisons. Before the District Court of Appeal petitioner contended, among other things, that two of the prior convictions were not proved. As petitioner points out, although exemplified copies of the Oregon conviction of larceny and larceny by bailee and of the Arizona conviction of grand theft were produced by the prosecuting attorney and numbered for identification, such copies were not offered or received in evidence; instead, the prosecuting attorney moved "to dismiss the second and third prior convictions as alleged in the information" and the trial court granted the motion. The District Court of Appeal, perhaps misled by the fact that the index to the reporter's transcript mistakenly shows that such exemplified copies were in evidence, and not having had its attention directed to the fact of dismissal, and presuming the judgments to be correct, rejected the contention of petitioner that the prior convictions had not been established (pp. 774-776 of 126 Cal.App.2d).
 The reason for the prosecuting attorney's not offering evidence of the two prior convictions, and for moving to *245 dismiss the charges, was stated by him at the trial. He seems to have been of the opinion that the prior convictions should not be charged and proved because they were adjudications that the defendant had committed acts which, had they been committed in California, would not have amounted to grand theft as defined by the law of this state (theft of money or property of a value exceeding $200 [Pen. Code,  487]). This appears from the statement of the prosecuting attorney that "I understand now that the dividing line between petty theft and grand theft in Arizona is $50.00 and in Oregon the dividing line is $35.00, so although those would stand as felony convictions in the other States, they would not be felony convictions in California." [1] Although this court, as required by statute since 1927 (Stats. 1927, p. 110; Code Civ. Proc.,  1875, subd. 3), takes judicial notice of the statutory definition of a crime in a sister state (see In re McVickers (1946), 29 Cal.2d 264, 278 [176 P.2d 40]), the District Court of Appeal did not judicially notice the Oregon and Arizona statutory delineations between grand and petty theft referred to in the quoted statement of the prosecuting attorney; it mistakenly said (p. 775 of 126 Cal.App.2d), "There being no evidence to the contrary, it will be assumed that the law with respect to the crimes charged as prior convictions in the sister states is the same as it is in California."
 After the decision of the District Court of Appeal became final petitioner filed the petition for habeas corpus which is now before us. He contends, in effect, that the superior court exceeded its jurisdiction in finding him guilty of two prior convictions the charges of which had been dismissed and which were not supported by proof, and that the District Court of Appeal likewise exceeded its jurisdiction in affirming those judgments. He points to the District Court's holdings that "Since appellant was shown to have been convicted of at least three prior felonies it cannot be said that in imposing consecutive sentences herein the court was improperly influenced to the prejudice of appellant by the prior conviction of larceny by bailee in the State of Oregon," and that "we cannot say that the denial of probation under such circumstances, amounted to an abuse of discretion" (p. 776 of 126 Cal.App.2d). This court issued an order to show cause, and the sheriff filed his return.
 Thereafter the attorney general advised the District Court *246 of Appeal of an entry in the clerk's transcript on appeal which apparently had not been previously directed to the attention of that court by either party to the appeal. Such entry shows that during the trial "Motion of the District Attorney to dismiss the second and third prior convictions as alleged in the information is granted." The District Court of Appeal (People v. Bartges (1954), supra, 128 Cal.App.2d 496, 498) determined that "A mistake of fact on the part of an appellate tribunal which results in prejudicial error or a miscarriage of justice affords a proper ground for recall and correction of the remittitur [citations] ... Since the motion to dismiss the last two prior convictions was granted by the trial court and was not brought to the attention of this court prior to rendition of its decision affirming the judgments containing a finding that all three priors charged were true, we are persuaded that such decision being inadvertently rendered under a mistake of fact entitles us to take such steps as are necessary to bring into agreement the facts and the law."
 The District Court of Appeal recalled its remittitur. It noted the fact that petitioner urged "that the improper finding of three prior convictions resulted in improper imposition of consecutive sentences" and modified its original order of full affirmance to provide that "The judgments are modified by striking therefrom the finding of the truth of the second and third prior conviction [sic]," but, as hereinabove indicated, instead of thereupon reversing the judgments and remanding the cause to the trial court for determination of the questions as to whether, with the findings as to the two prior convictions stricken out, probation should be granted or denied and whether the sentences, if to be reimposed, should run cumulatively or concurrently, it impliedly and implicitly undertook to itself make those determinations by ordering that "as so modified the judgment and order are affirmed." (People v. Bartges (1954), supra, 128 Cal.App.2d 496, 497-498.)
 [2] The sheriff then filed a supplemental return which shows that petitioner is held under a modified abstract of judgments which show only one prior conviction (of arson). Therefore, petitioner's contention that the judgments were incorrect and beyond the power of the superior court to make (and the District Court of Appeal to affirm) in determining that the two prior convictions last recited therein (the charges of which had been dismissed) are true, has *247 become moot in that he has secured the relief in that respect to which he was entitled.
 Petitioner still complains, however, that the trial court must be understood to have been influenced to some extent in ordering that the sentences run consecutively by its mistaken belief that he had suffered three prior convictions of crimes which, if committed in California, would have amounted to felonies, and that the issue on this matter is not moot. The record and the law support petitioner in this contention. [3] As this court has previously held, it cannot be said that the trial court's unwarranted determination as to the number of prior convictions of felony did not influence it in sentencing petitioner to consecutive rather than concurrent terms. (People v. Morton (1953), 41 Cal.2d 536, 545 [261 P.2d 523].) Furthermore, as hereinabove shown, the District Court of Appeal in disposing of certain of petitioner's contentions adversely to him specifically relied upon the mistaken assumption that petitioner "was shown to have been convicted of at least three prior felonies" (p. 776 of 126 Cal.App.2d). [4] The right of petitioner to have the trial court determine upon the corrected record whether probation shall be granted or denied and whether the sentences, if reimposed, shall run cumulatively or concurrently is a substantial one. Inasmuch as the statutes (Pen. Code,  1203; 669; see also id.,  1213; 1213.5; 3021; 3024; 3024.5; 3043) vest the power to make such determinations in the trial court and as the District Court of Appeal was acting only as a reviewing court, we conclude that the latter court exceeded its power and that the writ should issue for the purposes hereinafter specified.
 As indicated above, the petition for habeas corpus raises the further contention that petitioner was denied a fair trial in that the trial court refused to compel one Forrest Jameson to testify when called as a witness for petitioner. Jameson was jointly charged with petitioner with grand theft. His trial had been severed. He refused to testify on the ground that any evidence which he gave might tend to incriminate him. Petitioner presents no argument in this connection which would entitle him to relief on habeas corpus or which was not disposed of by the District Court of Appeal in People v. Bartges (1954), supra, 126 Cal.App.2d 763, 771-774.
 A question remains as to the form and substance of the order to be made in this case. [5, 6] In construing the meaning of the word "discharging" as used in section 1506 of *248 the Penal Code  [fn. 1] this court has recently noted that "The function of the writ of habeas corpus is solely to effect 'discharge' from unlawful restraint, though the illegality in respect to which the discharge from restraint is sought may not go to the fact of continued detention but may be simply as to the circumstances under which the prisoner is held" and that he "may be discharged from illegal conditions of restraint although not from all restraint." (In re Chessman (1955), ante, pp. 1, 5, 6 [279 P.2d 24]; see also Pen. Code,  1484 ["The court ... must ... dispose of such party [petitioner] as the justice of the case may require"]; id.,  1493 ["In cases where any party is held under illegal restraint or custody ... the ... court may order such party to be committed to the restraint or custody of such person as is by law entitled thereto"]; In re McCoy (1945), 32 Cal.2d 73, 77 [194 P.2d 531, 11 A.L.R.2d 934]; In re James (1952), 38 Cal.2d 302, 313-314 [240 P.2d 596].) Upon initial consideration of the petition for the writ of habeas corpus we issued not the writ but an order to show cause why the relief prayed for should not be granted. The sheriff made his return to such order and the parties have stipulated that the petition for the writ shall be treated as a traverse to the return of the respondent sheriff. We also treat the return of the sheriff to the order to show cause as a return to the writ which is to be granted. [7] We have concluded that the writ should be granted, not to discharge the petitioner from custody of the sheriff but to discharge him from only the illegal circumstances of his restraint which have been depicted above and to order his production before the superior court so that he may be dealt with according to law as a person properly convicted of, but not yet properly sentenced for, the substantive crimes charged in the informations in Los Angeles Superior Court criminal cases Number 155767 and Number 155768 and the first, and only the first, prior conviction alleged in each of the above numbered informations.
 For the reasons hereinabove stated, the petition for the writ of habeas corpus is granted and the petitioner is remanded to the custody of the sheriff of the county of Los Angeles to be brought before the superior court in that county to *249 be dealt with according to law as a person validly and finally convicted of, but not since the modifications of the record as to prior convictions sentenced for, the substantive crimes charged in the informations in Los Angeles Superior Court criminal cases Number 155767 and Number 155768, and found to have been previously convicted of, and to have served a term in a state prison for, one, and only one, prior conviction of felony, to wit, arson, a felony (in Oregon), as alleged in the information in each of the above numbered cases.
 Upon production of the petitioner in the superior court as above ordered that court shall proceed to arraign him for judgment upon the record as amended by the order of the District Court of Appeal in People v. Bartges (1954), 128 Cal.App.2d 496, 497-498 [275 P.2d 518]. Upon such arraignment the superior court will have power to consider, and in its discretion to grant or deny, an application for probation, if petitioner so requests, and will have power, and the duty if it determines that judgments shall again be pronounced, to direct whether the sentences shall run cumulatively or concurrently.
 Gibson, C.J., Shenk, J., and Carter, J., concurred.
 TRAYNOR, J.
 I dissent.
 Petitioner was convicted of one count of forgery and one count of grand theft, and it was found in the judgment of conviction that he had suffered three prior felony convictions, although two of the three priors charged against him had been dismissed on motion of the district attorney before the case was submitted to the jury. Probation was denied, and it was ordered that the sentences on the primary counts should run consecutively. Petitioner appealed. The judgment was affirmed and became final. (People v. Bartges, 126 Cal.App.2d 763 [273 P.2d 49]. No petition for hearing was filed in this court.) Petitioner then applied to this court for a writ of habeas corpus, and we issued an order to show cause why the writ should not issue. Thereafter, the District Court of Appeal was apprised of the fact that two of the three priors charged had been dismissed and on grounds of mistake it recalled the remittitur and modified the judgment of conviction by striking therefrom the finding that petitioner had suffered two of the three prior felony convictions. The judgment, as modified, was affirmed. (People v. Bartges, 128 Cal.App.2d 496 [275 P.2d 518].) Thus, the judgment *250 no longer finds petitioner guilty of a charge not contained in the information.
 The controlling question in this habeas corpus proceeding is whether the District Court of Appeal acted in excess of its jurisdiction in affirming the judgment as modified rather than reversing it insofar as it imposed consecutive terms of imprisonment. Although the trial court, in denying petitioner's application for probation and in sentencing him to consecutive terms on the primary offenses, might have been influenced by the mistaken belief that he had suffered three prior felony convictions and although the District Court of Appeal could have reversed the judgment with directions to resentence petitioner and to reconsider his application for probation in the light of the corrected judgment (see People v. Morton, 41 Cal.2d 536, 545 [261 P.2d 523]), I do not believe that if the District Court of Appeal erred in affirming the judgment as modified, its error was jurisdictional.
 It is not suggested that the claimed error in the present case raises any constitutional or other question of extraordinary importance that would justify departure from the usual limitation that the writ of habeas corpus can be used only as a test of jurisdiction. (See In re Bell, 19 Cal.2d 488, 492-495 [122 P.2d 22]; In re Trombley, 31 Cal.2d 801, 812 [193 P.2d 734].) Thus, if a sentence is within the power of the trial court and the judgment is regular on its face, the fact that under the circumstances the sentence may be unduly severe cannot be inquired into by a writ of habeas corpus. (In re Marley, 29 Cal.2d 525, 531 [175 P.2d 832]; Ex Parte Miller, 89 Cal. 41, 42 [26 P. 620]; In re Nicholson, 24 Cal.App.2d 15, 16-17 [74 P.2d 288]; In re Azevedo, 42 Cal.App. 662, 663 [183 P. 952]; see also In re Pedrini, 33 Cal.2d 876, 878 [206 P.2d 699].)
 It is within the discretion of the trial court to direct that a defendant, who has been found guilty of the offense charged against him, be denied probation (Pen. Code,  1203) and that he serve consecutive sentences (Pen. Code,  669). The denial of probation and the imposition of consecutive sentences on petitioner were therefore within the power of the trial court even though it might have erred in exercising its discretion. On appeal, the District Court of Appeal had power to "reverse, affirm, or modify" the judgment. (Pen. Code,  1260; People v. Craig, 17 Cal.2d 453, 458 [110 P.2d 403].) It did modify and affirm and, even if it erred in affirming rather than reversing with directions to resentence, it did not "exceed its power" in doing so. *251
 At most, the District Court of Appeal erred in applying the provisions of article VI, section 4 1/2, of the California Constitution by failing to reverse the judgment with directions to resentence petitioner and to reconsider his application for probation in the light of the corrected judgment. If the propriety of an appellate court's application of article VI, section 4 1/2, can be questioned by a petition for a writ of habeas corpus, then a great number of this court's rulings on questions of prejudicial error will be subject to further review and the finality of criminal judgments will be seriously impaired.
 Moreover, at the time the District Court of Appeal recalled the remittitur,  [fn. *] the attorney general, in his "Suggestion of Grounds For Recall of Remittitur," raised the question of the propriety of modifying the judgment without reversing for reconsideration of petitioner's application for probation and resentencing on the basis of the judgment as modified. Counsel for petitioner was served with a copy of this document, but made no reply, and failed to petition for a rehearing in the District Court of Appeal or to file a petition for hearing in this court after the District Court of Appeal had filed its opinion modifying and affirming the judgment of conviction. Petitioner has not offered any excuse for his failure to exhaust his remedies by way of appeal. "The general rule is that habeas corpus cannot serve as a substitute for an appeal, and, in the absence of special circumstances constituting an excuse for failure to employ that remedy, the writ will not lie where the claimed errors could have been, but were not, raised upon a timely appeal from a judgment of conviction. [Citations.]" (In re Dixon, 41 Cal.2d 756, 759 [264 P.2d 513].)
 I would deny the writ.
 Edmonds, J., and Spence, J., concurred.
NOTES
[fn. 1]  1. Section 1506 provides that: "An appeal may be taken ... by the people from a final order of a superior court made upon the return of a writ of habeas corpus discharging a defendant after his conviction in all criminal cases ..."
[fn. *]  *. For the purposes of our decision in the present habeas corpus proceeding, the fact that the District Court of Appeal recalled the remittitur and modified the judgment has no more effect than if the judgment as thus modified had been entered originally. See In re Rothrock, 14 Cal.2d 34, 39 [92 P.2d 634].
