make a bound checking more compatible with Windows 64