*895Appeal from a judgment of the Supreme Court, Erie County (Ronald H. Tills, A.J.), rendered October 7, 2005. The judgment convicted defendant, upon his plea of guilty, of attempted rape in the first degree and criminal sexual act in the second degree.
It is hereby ordered that the judgment so appealed from be and the same hereby is unanimously modified as a matter of discretion in the interest of justice and on the law by vacating the sentence and by amending the orders of protection and as modified the judgment is affirmed, and the matter is remitted to Supreme Court, Erie County, for further proceedings in accordance with the following memorandum: On appeal from a judgment convicting him, upon his plea of guilty, of attempted rape in the first degree (Penal Law §§ 110.00, 130.35 [4]) and criminal sexual act in the second degree (§ 130.45 [1]), defendant contends that he was denied effective assistance of counsel on his petition for reassignment of counsel. That contention does not survive his plea of guilty inasmuch as “[t]here is no showing that the plea bargaining process was infected by any allegedly ineffective assistance or that defendant entered the plea because of his attorney[’s] allegedly poor performance” (People v Burke, 256 AD2d 1244 [1998], lv denied 93 NY2d 851 [1999]; see People v Hakes, 38 AD3d 1273 [2007]; People v Barnes, 32 AD3d 1250 [2006]). Defendant further contends that his sentence must be vacated because Supreme Court failed to impose the sentence promised in the plea agreement without affording him the opportunity to withdraw his plea. We agree. Although that contention is not foreclosed by defendant’s valid waiver of the right to appeal (see People v Hoeltzel, 290 AD2d 587, 588 [2002]; see also People v Snyder, 23 AD3d 761, 762 [2005]), defendant failed to preserve his contention for our review inasmuch as he failed to move to withdraw his plea or to object to the sentence imposed (see People v Mariani, 6 AD3d 1206 [2004], lv denied 3 NY3d 643 [2004]; People v Wilson, 289 AD2d 1088 [2001], lv denied 98 NY2d 656 [2002]). We nevertheless exercise our power to review defendant’s contention as a matter of discretion in the interest of justice (see CPL 470.15 [6] [a]; People v Fortner, 23 AD3d 1058 [2005]; People v Cooke, 21 AD3d 1339 [2005]). Because we agree with defendant that the court erred in failing to impose the promised sentence, we modify the judgment by vacating the sentence, and we remit the matter to Supreme Court to impose the sentence promised or to afford defendant the opportunity to withdraw his plea (see People v Appleberry, 34 AD3d 1257 [2006]; Fortner, 23 AD3d 1058 [2005]; Cooke, 21 AD3d 1339 [2005]).
*896Defendant also contends that the court violated the Ex Post Facto Clause of the Federal Constitution (US Const, art I, § 10 [1]) when it imposed a supplemental sex offender victim fee on the conviction of attempted rape pursuant to Penal Law § 60.35 (1) (b). Defendant’s contention is not foreclosed by the valid waiver of the right to appeal (see generally People v Seaberg, 74 NY2d 1, 9 [1989]), nor is preservation of defendant’s contention required inasmuch as it concerns the legality of the sentence (see generally People v Fuller, 57 NY2d 152, 156 [1982]). Although the conduct underlying defendant’s conviction of attempted rape in the first degree was committed after the legislation providing for the supplemental sex offender victim fee went into effect on April 1, 2004, the conduct occurred before the legislation was signed into law on August 20, 2004 (see L 2004, ch 56, part E, § 1). Therefore, the fee should not have been imposed on that count (see People v Thomas, 35 AD3d 192, 194 [2006], lv denied 8 NY3d 850 [2007]; see generally People v Hager, 5 AD3d 981 [2004]).
We further agree with the contention of defendant in his supplemental brief that, in setting the duration of the orders of protection, the court erred in failing to take into account the jail time credit to which he is entitled (see People v Dixon, 38 AD3d 1242 [2007]; People v Mingo, 38 AD3d 1270 [2007]; People v Clinkscales, 35 AD3d 1266 [2006]). Despite the fact that defendant’s contention is not foreclosed by the valid waiver of the right to appeal (see People v Victor, 20 AD3d 927 [2005], lv denied 5 NY3d 833, 885 [2005]; People v Holmes, 294 AD2d 871, 872 [2002], lv denied 98 NY2d 730 [2002]), we note that it is not preserved for our review (see CPL 470.05 [2]; see generally People v Nieves, 2 NY3d 310, 315-317 [2004]). We nevertheless exercise our power to address the contention as a matter of discretion in the interest of justice (see CPL 470.15 [6] [a]; Dixon, 38 AD3d 1242 [2007]; Mingo, 38 AD3d 1270 [2007]; Clinkscales, 35 AD3d 1266 [2006]). We therefore further modify the judgment by amending the orders of protection, and we direct Supreme Court upon remittal to determine the jail time credit to which defendant is entitled. The court must specify in each order of protection an expiration date in accordance with CPL 530.13 (4).
Based on our resolution of the sentencing issues, we see no need to address defendant’s remaining contentions concerning the sentence.
Finally, we note that the certificate of conviction incorrectly recites that defendant was convicted of attempted rape in the second degree. The plea transcript and the Penal Law section *897cited in the certificate make it clear that the certificate contains a typographical error and must therefore be amended to reflect that defendant was convicted of attempted rape in the first degree (see People v Saxton, 32 AD3d 1286, 1286-1287 [2006]; People v Benson, 265 AD2d 814, 816 [1999], lv denied 94 NY2d 860 [1999], cert denied 529 US 1076 [2000]). Present— Martoche, J.P, Lunn, Peradotto, Green and Pine, JJ.