An unauthorized sentence can be corrected by the trial court even though an appeal is pending. As a general rule, the filing of a valid notice of appeal vests jurisdiction of the cause in the appellate court until determination of the appeal and issuance of the remittitur, depriving the trial court of jurisdiction to make an order affecting the judgment. (People v. Lockridge (1993) 12 Cal.App.4th 1752.) An exception to this rule is that the trial court can correct an unauthorized sentence at any time and also, by a subsequent action, avoid creating an unauthorized sentence. (People v. Cunningham (2001) 25 Cal.4th 926, 1044-1045.) In case “A”, appellant was sentenced to five years in state prison with execution of sentence suspended and probation granted. While on probation, appellant was charged with a new offense in case “B”. Following the joint preliminary hearing/violation of probation hearing, appellant was found in violation of probation, probation was revoked, and the five-year prison term imposed. Appellant filed an appeal. While the appeal was pending, appellant pled guilty in case B, which included a “strike,” and was sentenced to prison with the term in case A running consecutively for one year and four months to the sentence imposed in case B. Appellant filed another appeal challenging the consecutive sentence imposed for the two cases. The appellate court rejected appellant’s claim that the trial court did not have jurisdiction to resentence on case A because the 120 day period under Penal Code section 1170, subdivision (d) that allows the court on its own motion to recall a sentence had lapsed. Observing that failure to run the sentence for case A consecutively to case B would have resulted in an unauthorized sentence under the Three Strikes law, the appellate court found that appellant did not fall within 1170(d) as the court was not acting under its own motion and, despite the pending appeal in case A, the court had jurisdiction to prevent an unauthorized sentence by resentencing on case A.