
65 Cal.2d 746 (1967)
THE PEOPLE, Plaintiff and Respondent,
v.
JESUS HUMBERTO ENRIQUEZ, Defendant and Appellant.
Crim. No. 10087. 
Supreme Court of California. In Bank.  
Feb. 8, 1967.
 Charles M. Berg, under appointment by the Supreme Court, Donald F. Roeschke and Marvin D. Homer for Defendant and Appellant.
 Thomas C. Lynch, Attorney General, William E. James, Assistant Attorney General, Michael J. Smolen and George J. Roth, Deputy Attorneys General, for Plaintiff and Respondent.
 PETERS, J.
 Defendant appeals from an order denying his motion to change his guilty pleas to not guilty. The basic question is whether, under rules established in In re Estrada, 63 Cal.2d 740 [48 Cal.Rptr. 172, 408 P.2d 948], and In re Kirk, 63 Cal.2d 761 [48 Cal.Rptr. 186, 408 P.2d 962], defendant is entitled to the benefit of an amendment to section 476a of the Penal Code adopted and effective before his conviction became final. There can be no doubt that the amended statute is applicable to defendant and that he is entitled to some form of relief.
 Before the Estrada point is discussed, however, a preliminary matter should be mentioned. Defendant also contends that his convictions should be set aside because at his preliminary hearing a confession in violation of the rules announced in Escobedo v. Illinois, 378 U.S. 478 [12 L.Ed.2d 977, 84 S.Ct. 1758], and People v. Dorado, 62 Cal.2d 338 [42 Cal.Rptr. 169, 398 P.2d 361], was introduced, and that his pleas of guilty were induced by that improperly admitted confession. Inasmuch as the convictions here involved became final after June 22, 1964, the date Escobedo was decided, the rules of those cases are applicable in a proper case. (In re Lopez, 62 Cal.2d 368 [42 Cal.Rptr. 188, 398 P.2d 380]; People v. Rollins, ante, p. 681 [56 Cal.Rptr. 293, 423 P.2d 221].) But this is not a proper case. [1] Although defendant now claims that his pleas of guilty were induced by the confession, the record shows that defendant pleaded guilty because of the representations of his counsel that the charges were misdemeanors. Defendant intended to plead guilty to such misdemeanors. As will later appear, we are holding in accordance with counsel's representations and in accordance with defendant's belief. Under such circumstances, where it appears that the plea of guilty was not induced by the improperly secured confession, the rules announced in In re *748 Seiterle, 61 Cal.2d 651 [39 Cal.Rptr. 716, 394 P.2d 556], preclude the application of Escobedo and Dorado.
 The record shows that on October 1, 1963, defendant was arraigned on an information charging him with a felony violation of section 476a of the Penal Code, in that on various dates he had wrongfully passed checks totaling $56. After first pleading not guilty to this charge, defendant, in open court and in the presence of his counsel, withdrew the not guilty plea on October 23, 1963, and pleaded guilty as charged.
 In the meantime, on October 10, 1963, a second independent information had been filed charging defendant with another felony violation of section 476a of the Penal Code, in that he had, on various dates, wrongfully issued checks totaling $60. After first pleading not guilty to this charge, defendant, in open court and in the presence of his counsel, withdrew the not guilty plea on November 4, 1963, and pleaded guilty as charged.
 On December 19, 1963, petitioner was sentenced to the state prison on each conviction for the terms prescribed by law, the sentences to run concurrently. Defendant appealed, but the appeals were dismissed for failure to file an opening brief. The remittiturs issued August 18, 1964, and the convictions became final on that date.
 About one month later, on September 22, 1964, defendant filed his affidavit in support of his motion to withdraw the guilty pleas. He averred that he pleaded guilty because he had been assured by his counsel that the charged offenses were misdemeanors and that the maximum punishment that could be imposed for each offense was one year in the county jail. The motion was denied and defendant has appealed.
 [2] The facts alleged clearly entitle defendant to some form of relief.prior to September 20, 1963, subdivision (b) of section 476a of the Penal Code provided, in part, that "if the total amount of all such checks ... that the defendant is charged with and convicted of making, knowing, or uttering does not exceed fifty dollars ($50), the offense is punishable only by imprisonment in the county jail for not more than one year. ..." On September 20, 1963, an amendment to that section became effective which increased the fifty-dollar figure to one hundred dollars. Thus, under the amended statute, which became effective before the informations were filed and before defendant was sentenced, a person convicted of illegally issuing checks totaling $56 and separately charged with *749 illegally issuing checks totaling $60, could be convicted only of having committed two misdemeanors, and not of two felonies. In December of 1965 it was held that ameliorative amendments of this type applied to acts committed before their effective date as long as the conviction was not final on the effective date of the amendment. (In re Estrada, supra, 63 Cal.2d 740.) This rule has been held to apply to the very amendment here involved. (In re Kirk, supra, 63 Cal.2d 761.) These cases expressly disapproved People v. Harmon, 54 Cal.2d 9 [4 Cal.Rptr. 191, 351 P.2d 329], which had held such amendments applied only to acts committed after their passage. Here, although the charged acts were committed before September 20, 1963, the effective date of the amendment, the arraignments were held and defendant was sentenced subsequent to that date. He should have been sentenced under the amended statute. Thus, the judgments of conviction of two felonies and the sentences based thereon must be set aside under the theory of the Estrada and Kirk cases. [3] But this does not mean that complainant must be retried on the misdemeanor charges or that he should be relieved of all criminal liability. When the record reveals that the defendant cannot be held for the crimes for which he was convicted and sentenced but that he may properly be convicted of the crime charged but of a lesser degree or of a lesser included offense, this court has authority to reduce the judgment accordingly. Section 1260 of the Penal Code provides: "The court may reverse, affirm, or modify a judgment or order appealed from, or reduce the degree of the offense or the punishment imposed, ..."  [fn. 1] Under this section "the power to change the offense is as unlimited as the power to change the degree." (Witkin, Cal. Criminal Procedure (1963)  730, p. 702.)
 Examples of the exercise of this power are numerous. In People v. Bridgehouse, 47 Cal.2d 406 [303 P.2d 1018], a conviction of second degree murder was reduced on appeal to manslaughter, and the cause remanded to the trial court to enter judgment and resentence the appellant as directed. In People v. Dozie, 224 Cal.App.2d 474 [36 Cal.Rptr. 728], a conviction of robbery in the first degree was reduced to second *750 degree. In People v. Fernandez, 222 Cal.App.2d 760 [35 Cal.Rptr. 370], a judgment convicting defendant of first degree burglary while armed was reduced to second degree. The trial court had failed to submit to the jury the question whether defendant had been armed. But the proof of second degree burglary was clear, and the case was remanded to the trial court with directions to enter judgment convicting defendant of second degree burglary and to resentence him accordingly. People v. Simpson, 26 Cal.App.2d 223 [79 P.2d 119], is particularly in point. There the defendant was charged with the theft of goods valued at $300. If the value exceeded $200 the crime was a felony, if less, a misdemeanor. The defendant admitted the theft. He was found guilty of the felony. The appellate court held the evidence of value was insufficient. It said: "This, however, does not lead to a reversal of the case, or the sending of it back for retrial and adding additional costs to the county."
 "The defendants admitted the taking of the magnetos, and thereby admitted that they were guilty of petty theft. The jury has found the defendants guilty of stealing, but we think improperly fixed the degree as grand theft instead of petty theft."
 "... we are authorized to reduce the degree of the offense and fix the same only as petty theft, and thus avoid the necessity of a retrial." (26 Cal.App.2d at pp. 229-230.) The court remanded the case to the trial court with directions to enter judgment for petty theft and to pronounce sentence accordingly.
 This reasoning applies to the instant case. Under the rule of Estrada, supra, the two informations, while purporting to charge two felonies, in fact alleged two misdemeanor violations of section 476a. Defendant's attorney, anticipating the decision in Estrada, supra, which had not then been decided, recommended pleas of guilty. The defendant so pleaded. The defendant actually pleaded guilty to two misdemeanors. In this respect the case is indistinguishable from Simpson, supra.
 It matters not whether this petition be treated as a petition for habeas corpus or one in coram nobis. If coram nobis, the case is on appeal, and if it be treated as habeas corpus section 1484 of the Penal Code provides that on habeas corpus the court hearing the case "must thereupon proceed ... to dispose of such party as the justice of the case may require, ..." *751
 [4] Where the petitioner has demonstrated that his conviction was obtained under circumstances denying him due process, but it appears that he can be validly held on another or lesser offense, the case should be remanded for sentencing on the lesser offense. (In re Ralph, 27 Cal.2d 866 [168 P.2d 1].) What was said in In re Bramble, 31 Cal.2d 43, 47, 52 [187 P.2d 411], is clearly applicable. "Of course, if an indictment charged one offense and the court undertook to sentence the defendant for a different offense not that, or included in that charged, the sentence pronounced could not be sustained." (P. 47.) "But if in fact the judgments had been given for offenses other than those charged and to which the petitioner pleaded guilty, he would not be entitled to release but only to be returned to the superior court and resentenced for the charged and admitted offenses, ..." (Italics added.) (31 Cal.2d at p. 52.)
 There is one more factor to be considered. Here the convictions took place in 1963.presumably the complainant has already served some time in prison. Justice requires that he be given credit for the time served.
 The Attorney General urges that the district attorney should be permitted to amend the information by consolidating the two misdemeanor charges so as to charge one felony. He also contends that there is some reference in the record to the possibility that defendant had prior convictions, and that the district attorney should be permitted to charge these priors, if they exist. With priors, section 476a makes it a felony to illegally issue checks totaling over $50. The priors were not charged, proved, or admitted. Defendant has pleaded guilty to two misdemeanors and has served substantial time in prison. It would be highly unfair to defendant to permit an amendment of the information at this late date.
 Inasmuch as defendant admits he intended to plead guilty to two misdemeanors, the motion to withdraw the pleas of guilt is denied. The judgment convicting defendant of two felony violations of section 476a of the Penal Code is set aside and the case remanded to the trial court with directions to enter judgments of conviction of two misdemeanor violations of that section, and then to pronounce sentence as provided by law. Defendant is entitled to credit for time served.
 It is so ordered.
 Traynor, C. J., McComb, J., Tobriner, J., Mosk, J., Burke, J., and Sullivan, J., concurred.
NOTES
[fn. 1]  1. Reference should be made also to subdivision 6 of section 1181 of the Penal Code which provides: "When the verdict or finding is contrary to law or evidence, but if the evidence shows the defendant to be not guilty of the degree of the crime of which he was convicted, but guilty of a lesser degree thereof, or of a lesser crime included therein, the court may modify the verdict, finding or judgment accordingly without granting or ordering a new trial, and this power shall extend to any court to which the cause may be appealed; ..."
