Judgments, Supreme Court, Bronx County (Joseph Dawson, J.), rendered September 9, 2011, convicting defendant, upon his pleas of guilty, of criminal possession of a weapon in the second degree and two counts of criminal sale of a controlled substance in the third degree, and sentencing him to an aggregate term of 15 years, unanimously modified, on the law, to the extent of reducing the mandatory surcharge from $300 to $250 and reducing the crime victim assistance fee from $25 to $20, and otherwise affirmed.
Defendant knowingly, intelligently and voluntarily pleaded guilty, and the court properly denied defendant’s plea withdrawal motion. There is no evidence that defendant was under the influence of any medication during the plea proceeding. On the contrary, the court thoroughly questioned him about this subject during the plea colloquy and established defendant’s competence to plead guilty. In denying the plea withdrawal motion, the court also relied on its recollection of defendant’s demeanor during the plea proceeding. This was entirely appropriate (see People v Alexander, 97 NY2d 482, 486 [2002]), and it did not constitute speculation about medical matters beyond the court’s knowledge.
Defendant made a valid waiver of his right to appeal (see People v Ramos, 7 NY3d 737 [2006]; People v Lopez, 6 NY3d 248 [2006]; compare People v Bradshaw, 18 NY3d 257, 259 [2011]). The court did not conflate the right to appeal with the rights automatically forfeited by pleading guilty. Instead, it separately explained to defendant that as part of his plea bargain, he was agreeing to waive his right to appeal, and defendant confirmed that he understood this. The court also gave defendant sufficient information about the promised sentence, and defendant’s argument to the contrary is without merit.
The valid waiver forecloses review of defendant’s suppression and excessive sentence claims. As an alternative holding (see People v Callahan, 80 NY2d 273, 285 [1992]), we find that the *479suppression motion was properly denied, and that the sentence was not excessive. However, as the People concede, since defendant committed the crime at issue before the effective date of the legislation increasing the mandatory surcharge and crime victim assistance fee, defendant’s sentence is unlawful to the extent indicated (see People v Reeves, 6 AD3d 231 [1st Dept 2004]). Concur — Gonzalez, P.J., Andrias, Saxe, Richter and Clark, JJ.