Fixed crash on Windows 7