Fix for AccessViolation on Windows 8.1 x64