Appeal from a judgment of the Supreme Court, Erie County (Christopher J. Burns, J.), rendered October 28, 2009. The judg*1698ment convicted defendant, upon his plea of guilty, of attempted murder in the second degree.
It is hereby ordered that the judgment so appealed from is unanimously affirmed.
Memorandum: In appeal No. 1, defendant appeals from a judgment convicting him upon his plea of guilty of attempted murder in the second degree (Penal Law §§ 110.00, 125.25 [1]) and, in appeal No. 2, he appeals from a judgment convicting him upon his plea of guilty of reckless endangerment in the first degree (§ 120.25). Defendant contends in each appeal, in his main brief and pro se supplemental brief, that Supreme Court abused its discretion in denying his motion to withdraw each guilty plea because it was not knowingly, voluntarily and intelligently entered. Although that contention survives defendant’s valid waiver of the right to appeal (see People v Wright, 66 AD3d 1334, 1334 [2009], lv denied 13 NY3d 912 [2009]), it is without merit. “ ‘The unsupported allegations of defendant that [his family] pressured him into accepting the plea bargain do not warrant vacatur of his plea’ ” (People v James, 71 AD3d 1465, 1465 [2010]). Further, there is no indication in the record that defendant’s ability to understand the plea proceeding was impaired based on his alleged failure to take required medication (see generally People v Spikes, 28 AD3d 1101, 1102 [2006], lv denied 7 NY3d 818 [2006]). The waiver by defendant of the right to appeal does not bar his contention in his main brief in appeal No. 2 with respect to the severity of the sentence because “the record establishes that defendant waived his right to appeal before [Supreme] Court advised him of the potential periods of imprisonment that could be imposed” (People v Mingo, 38 AD3d 1270, 1271 [2007]). Nevertheless, we conclude that the sentence is not unduly harsh or severe.
Defendant also contends in his main brief in appeal No. 2 that the court erred in fixing the duration of the orders of protection imposed upon the conviction of reckless endangerment in the first degree, a class D felony. Although defendant failed to preserve that contention for our review (see People v Nieves, 2 NY3d 310, 315-317 [2004]), we nevertheless exercise our power to review it as a matter of discretion in the interest of justice (see CPL 470.15 [6] [a]). As the People correctly concede, the orders of protection issued in favor of the victims of that crime exceed the maximum legal duration of the applicable version of CPL 530.13 (4) (ii) in effect at the time of sentencing, i.e., when the judgment was rendered. That version provided that the duration of an order of protection entered in connection with a felony conviction shall not exceed “three *1699years from the date of the expiration of the maximum term of an indeterminate . . . sentence of imprisonment actually imposed” (id.). Moreover, the duration may not be applied to the aggregate sentence but, rather, “ ‘must be added to the maximum term of the sentence imposed’ ” for the count upon which the order of protection was based (People v Harris, 285 AD2d 980 [2001]). Thus, the orders of protection at issue may not exceed three years from the expiration of the seven-year maximum term of the indeterminate sentence imposed upon defendant’s conviction of reckless endangerment in the first degree. We therefore modify the judgment in appeal No. 2 by amending the orders of protection, and we remit the matter to Supreme Court to determine the jail time credit to which defendant is entitled and to specify in each order of protection an expiration date in accordance with the version of CPL 530.13 (former [4] [ii]) in effect when the judgment was rendered on October 28, 2009.
We reject defendant’s further contention in his pro se supplemental brief that the court erred in refusing to allow him to substitute assigned counsel. “ ‘The decision to allow a defendant to substitute counsel is largely within the discretion’ ” of the court to which the application is made (People v Kobza, 66 AD3d 1387, 1388-1389 [2009], lv denied 13 NY3d 939 [2010]). Here, there was no abuse of discretion inasmuch as defendant failed to show the requisite “good cause for substitution” (People v Sides, 75 NY2d 822, 824 [1990]). Contrary to defendant’s implicit contention, he “did not establish that there was a complete breakdown in communication with h[is] attorney” (People v Botting, 8 AD3d 1064, 1065 [2004], lv denied 3 NY3d 671 [2004]). Finally, to the extent that defendant’s contention in his pro se supplemental brief that he was denied effective assistance of counsel survives his guilty plea and valid waiver of the right to appeal in appeal Nos. 1 and 2 (see People v Lewandowski, 82 AD3d 1602, 1602-1603 [2011]), we conclude that his contention lacks merit (see generally People v Ford, 86 NY2d 397, 404 [1995]). Present — Smith, J.P., Centra, Fahey, Gorski and Martoche, JJ.