Limit the code to Windows only since the crash is only on Windows.