Trial court’s failure to apply Penal Code section 654 when advising defendant of his maximum possible sentence during plea proceedings was not a mistake that constituted good cause for withdrawal of the plea. Archer was charged with robbery, carjacking, assault, and other offenses against three individuals. The People offered a plea bargain of 27 years and 4 months, and the trial court advised Archer that he was facing a sentence of 34 years, 4 months to life if he was convicted of everything. He accepted the offer, but later filed a motion to withdraw his plea. The trial court denied the motion and sentenced Archer in accordance with the plea agreement. On appeal, he contended that the trial court overstated the maximum sentence he faced if convicted because it did not apply section 654 to stay some of his sentences. Had he known the maximum sentence he actually faced (23 years to life by his calculation), he would not have accepted the negotiated disposition. Held: Affirmed. The trial court’s failure to explain the possible effects section 654 might have on Archer’s sentence was not a mistake that constituted good cause to withdraw Archer’s no contest plea. Because the trial court has broad latitude in determining whether section 654 applies in a given case, the court cannot predict in advance how it will rule at sentencing. Further, the nature of the inquiry under section 654 is factual and cannot be determined in advance, especially where there has not been a trial or an evidentiary hearing. In order to properly advise Archer of the maximum sentence, the trial court had to disregard factors, like section 654, that might or might not reduce the sentence. Further, even if the trial court had misadvised Archer, he did not make a sufficient showing of prejudice to justify withdrawal of the plea. The appellate court also rejected a claim of ineffective assistance of counsel.