Defendant accepted a plea bargain which permitted him to plead guilty to attempted rape in the first degree and a felony count of driving while intoxicated in satisfaction of two indictments then pending against him. As part of the agreement, defendant received a sentencing commitment of 5 to 10 years’ imprisonment for the attempted rape and IV2 to 3 years’ imprisonment for driving while intoxicated, both sentences to run concurrently.
When defendant originally appeared for sentencing, the prosecution inadvertently failed to file the statement indicating that defendant was to be sentenced as a second felony offender. In light of this omission, the parties appeared for resentencing four days later and the procedural requisites of CPL 400.21 were complied with. In both instances, County Court imposed the sentences which had been promised as part of the plea bargain. This appeal by defendant ensued.
On appeal defendant contends that the resentencing procedure was improper. We disagree. It was within County Court’s inherent power to correct this error by resentencing defendant (see, People v Wright, 56 NY2d 613, 614). Moreover, the resentencing transcript clearly indicates that defendant was advised of his right to controvert the statement and declined to do so. The fact that defendant was not specifically advised of his right to contest the constitutional basis of his prior felony conviction does not constitute reversible error or indicate that he was denied the effective assistance of counsel (see, People v Demand, 115 AD2d 139). In our view, upon resentencing, there was substantial compliance with CPL 400.21 and, consequently, defendant was properly sentenced as a predicate felon (see, People v Vermette, 112 AD2d 464, 465).
Defendant also contends that he was confused as to the terms of the plea bargain and did not realize that he was pleading guilty to the charge of driving while intoxicated. The record of the plea allocution, however, is unambiguous and evidences that defendant was well aware that he was pleading *853guilty to this particular crime in addition to the other charge of attempted rape. Equally unavailing is defendant’s contention that his sentence was harsh and excessive. We have considered defendant’s other contentions and find them to be without merit.
Judgment affirmed. Casey, J. P., Mikoll, Levine, Harvey and Mercure, JJ., concur.