Fixed compatibility with Windows 8