
34 Cal.App.2d 327 (1939)
THE PEOPLE, Respondent,
v.
E. V. NICHOLSON, Appellant.
Crim. No. 386. 
California Court of Appeals. Fourth Appellate District.  
August 24, 1939.
 Francis C. Mackall for Appellant.
 Earl Warren, Attorney-General, and Bayard Rhone, Deputy Attorney-General, for Respondent.
 Barnard, P. J.
 The defendant was charged with the crime of burglary. The information further charged two prior convictions, it being alleged that on or about December 21, 1922, he was, in the Superior Court of Los Angeles County, convicted of the crime of burglary and sentenced to San Quentin and that on October 28, 1924, he was, in the Superior Court of San Diego County, convicted of the crime of burglary and sentenced to Folsom. He was arraigned on June 24, 1935, and pleaded not guilty and not guilty by reason of insanity, but admitted the prior convictions as charged. *329
 On July 16, 1935, a jury found him guilty of burglary in the second degree. After that verdict was returned it was stipulated that the same jury might try the issue of insanity and the court set the hearing on that plea for July 23, 1935, and fixed the time for pronouncing sentence for July 20, 1935. On that day, the court adjudged the defendant an habitual criminal and sentenced him to imprisonment in Folsom for the term prescribed by law. It was then ordered that he be held in the county jail until after the trial on the plea of insanity "to be held on July 23rd, 1935". On that day, the jury returned a verdict finding him sane on the date charged in the information and, thereafter, he was taken to prison.
 On May 4, 1939, in the Superior Court of Riverside County the defendant moved for an order vacating and setting aside the judgment upon the ground that the same "was prematurely entered and void". Without directly deciding the motion the court, after reciting most of the facts above stated, found that the commitment had erroneously issued and ordered the defendant returned to court on May 22, 1939, "for the purpose of having judgment pronounced in accordance with law". On that day, a motion for a new trial on all statutory grounds and on the ground that sentence had not been pronounced within the time prescribed by law was made and denied. A motion in arrest of judgment on the same grounds was made and denied and the court then entered an order adjudging and decreeing the defendant to be an habitual criminal, that he be punished by imprisonment in the state prison at Folsom for life, that he should not be eligible for parole until he had served at least 12 years, and that he be remanded to custody. Thereupon, the defendant appealed from the order denying his motion for a new trial, from the order denying the motion in arrest of judgment and from the judgment.
 The appellant does not here complain of the fact that he was resentenced insofar as this affects the error in pronouncing judgment before the issue of insanity was tried. The correction of such errors by bringing back the defendant and resentencing him has been frequently upheld. (See People v. Marshall, 209 Cal. 540 [289 P. 629]; In re Lee, 177 Cal. 690 [171 P. 958]; People v. Wilson, 15 Cal.App.2d 172 [59 PaCal.2d 187]; People v. Stratton, 133 Cal.App. 309 [24 PaCal.2d 174].) [1] The respondent, however, *330 contends that there was no right of appeal here since the same points might have been presented upon an appeal from the original judgment. In effect, the motion to vacate the original judgment was granted. The judgment thereafter entered was a final judgment and the appellant had the right to appeal therefrom and from the order denying a new trial. (Penal Code, sec. 1237; see, also, People v. Frye, 137 Cal.App. 525 [31 PaCal.2d 204]; People v. Marshall, supra.) The order denying the motion in arrest of judgment was not appealable.
 [2] The appellant contends that that portion of the judgment which adjudged him to be an habitual criminal is void because the information failed to allege, in connection with the prior convictions charged, that he had served terms therefor in a prison or penitentiary. It should be noted that while he admitted the priors as charged, this was not an admission that terms had been served. He relies upon People v. Marshall, 99 Cal.App. 224 [278 P. 258], People v. McKinley, 2 Cal.2d 133 [39 PaCal.2d 411], People v. Dawson, 210 Cal. 366 [292 P. 267], and People v. Arnest, 133 Cal.App. 114 [23 PaCal.2d 812]. The first two of these cases have no bearing on the present problem. In People v. Marshall, supra, no trial was had on the insanity issue and it was held that the court had no jurisdiction to pronounce sentence without hearing evidence on the insanity plea. In People v. McKinley, supra, the court held that it was not necessary for the judgment to contain a statement that the defendant had served a prior term for a prior conviction where that fact was alleged, proved and found by the jury. The other two cases contain some language which tends to support the appellant's contention. In People v. Dawson, supra, after noting that one of the requirements of section 667 of the Penal Code is that the defendant must have served a term in some penal institution in connection with a prior conviction, it is stated that "the necessary facts must be both pleaded and proved". Immediately thereafter, however, the court points out that the case of People v. Sampson, 99 Cal.App. 306 [278 P. 492], recognizes the fact that, in establishing a foundation for a valid judgment imposing a more severe sentence on account of a previous conviction of a felony, "it is essential that in some manner it appear that he has 'served a term therefor' in some penal institution". The opinion in People v. Arnest, supra, also contains language *331 to the effect that if the information fails to charge that a term in prison was served it fails to charge facts essential to support a judgment based upon a prior conviction. In both of these cases, however, the defendant had pleaded guilty and, in effect, it was held that the fact that he had served a term upon a prior conviction was neither alleged nor proved. It should also be noted that neither of those cases mentioned or discussed section 969 of the Penal Code, which clearly provides that in charging a previous conviction of a felony in an indictment or information it is sufficient to state that the defendant had previously, in a named court, been convicted of a felony.
 In the case of In re Boatwright, 216 Cal. 677 [15 PaCal.2d 755], the defendant sought his release on habeas corpus after having been convicted of petit theft with prior convictions. The information alleged, as to each of the prior convictions, that the judgment had been pronounced and had never been reversed or set aside, but failed to charge that a term had been served in any penal institution. The defendant admitted the prior convictions "as charged in the information" and pleaded not guilty. No evidence concerning the prior convictions was introduced at the trial but when the defendant's statement was taken, before judgment was pronounced, he admitted that he had served time in penal institutions in connection with three of the former convictions. No appeal was taken from the judgment but after the defendant had served the requisite time, as for a first offense, the habeas corpus proceeding was brought. The court held that the information was sufficient in the light of the provisions of section 969 of the Penal Code, but held that proof of service of terms in penal institutions under the prior convictions was essential in order to give the court jurisdiction to adjudge the defendant an habitual criminal. The court said that while the better practice was to allege the service of terms under the prior convictions, the defendant could not be said to have suffered any prejudice by the failure to allege this in the information, inasmuch as he admitted before the judgment was pronounced that he had served such terms. In referring to People v. Dawson, supra, and People v. Sampson, supra, the court said: "The most that can be said for those cases is that, while the information did not charge service of time under said convictions, it was not shown, as a matter of fact, that the defendant in those cases had actually *332 served a term under said prior convictions." The defendant was then ordered discharged for another reason.
 In People v. Birdsell, 6 Cal.App.2d 749 [45 PaCal.2d 378], the information failed to allege that the defendant had served terms in connection with prior convictions which were charged but upon arraignment he admitted that he had served a separate term in prison on each of the prior convictions. The court held that this was sufficient. In People v. Harvey, 137 Cal.App. 22 [29 PaCal.2d 787], the serving of time was not alleged in the information but the record showed that the defendant had admitted that fact, and this also was held sufficient. Similar holdings are to be found in People v. Birdsell, 21 Cal.App.2d 682 [70 PaCal.2d 231], People v. Frye, supra, and in In re Boatwright, 119 Cal.App. 420 [6 PaCal.2d 972].
 In the instant case the information complied with the requirements of section 969 of the Penal Code and we therefore hold that the part of the judgment which rests upon the charge of prior convictions was not void merely because the service of terms in connection with those convictions was not alleged in the information.
 [3] It was necessary, however, that the fact that such terms had been served should be established either by evidence or by the admission of the appellant before judgment was pronounced. It is next contended by the appellant that the service of terms in connection with both of the particular prior convictions with which he was charged was not here established either by his admission or by the evidence. This contention must be sustained.
 During the trial on the insanity issue a statement made by the appellant to the district attorney and taken down by a reporter was, by stipulation, received and read into evidence. In this statement the appellant admitted that he had served 18 months in San Quentin, although he stated that he was there in 1921 upon a conviction in San Diego on a charge of burglary. He further admitted that he went to Folsom in 1924 upon conviction in San Diego of a charge of first degree burglary and that he there served "seven years or more". He further stated that he served a term in the state prison of Arizona "for counterfeiting and robbing box cars", that he served a term for burglary in the state prison in Columbus, Ohio, and that he served a term of three years and four months in the state prison in Colorado, from 1914 to 1917. *333 He further stated that he was "wanted in Arizona for several different charges". While he admitted having served terms upon five prior convictions, one of which corresponded to one of those alleged in the information, none of the others corresponded to the other prior with which he was charged. As a result, the evidence fails to establish the service of a term in connection with each of the prior convictions charged and fails to sustain that part of the judgment adjudging the appellant to be an habitual criminal.
 [4] Charges of prior convictions affect the circumstances surrounding the commission of a new offense and are to be considered for their effect upon the new offense which is charged. The proving of such prior convictions is a statutory proceeding and since the amendment of section 969a of the Penal Code, in 1931, there is no statutory authorization for passing upon the question as to whether such convictions have been suffered other than in connection with the new offense charged and by the same jury. (People v. Ysabel, 28 Cal.App.2d 259 [82 PaCal.2d 476].) [5] It is not practicable, therefore, by a reversal of that part of this judgment affecting the prior convictions, to remand the cause for further trial on that issue. Such a course was followed in People v. Willison, 116 Cal.App. 157 [2 PaCal.2d 543]. But, in that case, the new offense charged was committed and the judgment was pronounced prior to the amendment of section 969a in 1931.
 In a number of cases where there was a failure to establish the fact that terms had been served in connection with prior convictions charged, the judgment has been modified by eliminating that portion based upon the prior convictions while affirming the remainder, or the judgment has been reversed with instructions to the trial court to resentence the defendant on a similar basis. (People v. Dawson, supra; People v. Arnest, supra; People v. Lohr, 28 Cal.App.2d 397 [82 PaCal.2d 615]; People v. Valdez, 3 Cal.App.2d 700 [40 PaCal.2d 592]; People v. Hayes, 3 Cal.App.2d 59 [39 PaCal.2d 213]; People v. Pace, 2 Cal.App.2d 464 [38 PaCal.2d 202]; People v. d'A Philippo, 220 Cal. 620 [32 PaCal.2d 962]; People v. Shaw, 137 Cal.App. 533 [30 PaCal.2d 1031].) In all or nearly all of these cases it appears either that the defendant could not have been convicted as an habitual criminal, or that it did not appear that the defendant *334 had actually served terms on the requisite number of prior convictions.
 We are here confronted with a somewhat different situation. While there is a variance between the charges of prior convictions contained in the information and the established facts with reference to terms actually served by the appellant in connection with prior convictions of felony, it appears from the admission of the appellant that two such terms were actually served in this state and at least three such terms were served in other states. While ample facts were established to sustain an adjudication that the appellant was an habitual criminal that part of the judgment cannot stand because of a technical error. Under such circumstances, the appellant should not be freed from the habitual criminal charge and resentenced as an ordinary offender or even as one who has suffered one prior conviction. He has appealed from the entire judgment and we are at liberty to treat the case as one where error not only appears in connection with one of the issues but where that issue is directly related to and intimately connected with the other issue. It would seem that upon a retrial evidence would be available to show that the appellant had served terms upon two prior convictions in this state. It might also be possible to procure evidence of the serving of terms upon one or more of the prior convictions in other states which were here admitted by the appellant. In such event, the information could still be amended to charge such further priors since the charge upon the new offense would still be pending.
 The appeal from the order denying the motion in arrest of judgment is dismissed. The appeals from the judgment and from the order denying the motion for a new trial are reversed and the cause in its entirety is remanded for a new trial.
 Griffin, J., and Haines, J., pro tem., concurred.
