Judgment, insofar as it imposes sentence, unanimously reversed, on the law, and otherwise judgment affirmed and defendant remanded to Niagara County Court for resentencing, in accordance with the following memorandum: In sentencing defendant as a second felony offender, it was improper to rely upon a predicate felony which postdated the instant offense (Penal Law, § 70.06, subd. 1, par [b]; People v Gillman, 49 A.D.2d 951). Further, by his plea defendant waived his right to a determination of the Huntley hearing (see People v Christy, 92 A.D.2d 750). We have examined the remaining issues and find them to be without merit.