Judgment, Supreme Court, Bronx County (Steven Lloyd Barrett, J.), rendered November 4, 2004, convicting defendant, upon his plea of guilty, of two counts of criminal possession of a weapon in the third degree and two counts of criminal sale of a firearm in the third degree, and sentencing him to two consecutive terms of 4 years to run concurrently with two concurrent terms of 2½ to 7 years, unanimously modified, on the law, to the extent of vacating the DNA databank fee, and otherwise affirmed.
Defendant knowingly and intelligently waived his right to appeal, and this waiver encompassed his excessive sentence claim (People v Hidalgo, 91 NY2d 733 [1998]; People v Seaberg, 74 NY2d 1, 9-10 [1989]). In any event, were we to find that defendant did not validly waive his right to appeal, we would perceive no basis for reducing the sentence.
As the People concede, since the crime was committed prior to the effective date of the legislation (Penal Law § 60.35 [1] [a] [v] [former (1) (e)]) providing for the imposition of a DNA databank fee, that fee should not have been imposed. Since this issue involves the substantive legality of the sentence, it survives defendant’s waiver of his right to appeal. Concur— Tom, J.P., Friedman, Nardelli, Williams and Sweeny, JJ.