Fix for Windows 8.1 errors