Appeal from a judgment of the Oneida County Court (Barry M. Donalty, J.), rendered February 29, 2012. The judgment convicted defendant, upon a jury verdict, of attempted criminal sexual act in the first degree, sexual abuse in the first degree (three counts) and course of sexual conduct against a child in the second degree.
It is hereby ordered that the judgment so appealed from is unanimously modified on the law by reducing the period of postrelease supervision imposed on the first count of the indictment to a period of 15 years and as modified the judgment is affirmed.
Memorandum: Defendant appeals from a judgment convicting him upon a jury verdict of one count each of attempted criminal sexual act in the first degree (Penal Law §§ 110.00, 130.50 [4]) and course of sexual conduct against a child in the second degree (§ 130.80 [1] [b]), and three counts of sexual abuse in the first degree (§ 130.65 [3]). Defendant contends that County Court *1381erred in refusing to suppress his statement to the police on the ground that he gave the statement involuntarily. We reject that contention. A statement “is ‘involuntarily made’ when it is obtained by [the police] by means of any promise or statement of fact which creates a substantial risk that the defendant might falsely incriminate himself’ (People v Mateo, 2 NY3d 383, 413 [2004], cert denied 542 US 946 [2004]). “To determine voluntariness, courts review all of the surrounding circumstances to see whether the defendant’s will has been overborne” (id.; see People v Collins, 106 AD3d 1544, 1545 [2013], lv denied 21 NY3d 1072 [2013]).
Here, the evidence at the Huntley hearing, including the videotaped interrogations, establishes that defendant’s statement was voluntarily made and that coercive police activity did not occur (see Mateo, 2 NY3d at 414). The fact that defendant was told that he failed a polygraph examination did not render the statement involuntary (see People v Ellis, 73 AD3d 1433, 1434 [2010], lv denied 15 NY3d 851 [2010]; People v Melendez, 149 AD2d 918, 918-919 [1989]). Defendant’s claim that he was under duress and confused because of an illness is not supported by the evidence at the Huntley hearing. In arguing otherwise, defendant improperly relies on his testimony at trial (see People v McCurty [appeal No. 2], 60 AD3d 1406,1407 [2009], lv denied 12 NY3d 856 [2009]).
We conclude that the sentence is illegal insofar as it imposes a 20-year period of postrelease supervision for attempted criminal sexual act in the first degree (see Penal Law § 70.45 [2-a] [e]). “ ‘Although [that] issue was not raised before the [sentencing] court or on appeal, we cannot allow an [illegal] sentence to stand’ ” (People v Davis, 37 AD3d 1179, 1180 [2007], lv denied 8 NY3d 983 [2007]). We therefore modify the judgment by reducing the period of postrelease supervision on the first count of the indictment to a period of 15 years. The sentence as modified is not unduly harsh or severe. Present — Scudder, PJ., Centra, Garni, Sconiers and Whalen, JJ.