Where appellant committed a new offense prior to sentencing on his plea bargain which included a Cruz waiver, the court did not err by imposing the maximum sentence. Appellant entered into a plea agreement and was sentenced to a four year term. As part of the plea, appellant agreed to a Cruz waiver, pursuant to which he was released from custody in return for a promise not to commit other crimes and return for sentencing, or face a maximum term sentence of eight years. Appellant returned for sentencing, but the sentencing was continued several times over several months. In the interim, appellant committed a robbery. Because of that new offense, the court sentenced appellant to eight years, as agreed to by the Cruz waiver. The appellate court affirmed the conviction and sentence. The fact that a handwritten notation appeared on the plea form which said “Cruz waiver until 9/19/05” (the original sentencing date) did not mean that the waiver was only effective until that date. The parties intended the Cruz waiver to remain in effect until appellant was actually sentenced, and that did not occur until after appellant committed the robbery. Further, the sentence agreed to by the Cruz waiver was the maximum term of eight years, not “up to eight years.” Appellant’s challenge to the sentence based on Penal Code section 654 was not cognizable on appeal because appellant did not obtain a certificate of probable cause. Finally, the trial court did not violate appellant’s right to a jury trial on the robbery. Appellant expressly waived his right to a jury when as a part of the Cruz waiver he agreed that any violation of the terms would be decided by the sentencing court without a jury and by a preponderance of evidence.