There's no point in testing for Windows 10 since the comparison is already "greater than or equals", and it identifies itself as 6.2 for backwards compatibility. Likely it was failing before because the return type was wrong.
Version checks are unreliable anyways, should use feature checks, but "if it ain't broke don't fix it".