
    The People of the State of New York, Respondent, v Robert Ford, Appellant.
   Judgment unanimously modified on the law and as modified affirmed and matter remitted to Niagara County Court for further proceedings, in accordance with the following memorandum: Upon his plea to attempted sexual abuse in the first degree, defendant was sentenced as a predicate felon to an indeterminate term of imprisonment of 1 Vi to 3 years to run concurrently with the undischarged term of his previously imposed indeterminate sentence. The court was required to impose a sentence to run consecutively with respect to the undischarged sentence (Penal Law § 70.25 [2-a]). Since the court’s original sentence was defective and invalid, the court had inherent power to correct its own error by resentencing the defendant to a consecutive term (see, People v Wright, 56 NY2d 613; People v Minaya, 54 NY2d 360, 365, cert denied 455 US 1024; cf., Matter of Campbell v Pesce, 60 NY2d 165, 168-169). The court erred, however, in denying defendant’s application to withdraw his plea; therefore, we remand defendant to Niagara County Court so that he may withdraw his guilty plea and stand trial or be resentenced in compliance with the law (see, People v Price, 140 AD2d 927). We have considered defendant’s remaining claim that his plea was invalid and find that it is without merit. (Appeal from judgment of Niagara County Court, DiFlorio, J. — attempted sexual abuse, first degree.) Present — Dillon, P. J., Denman, Green, Lawton and Davis, JJ.  