Fix 0x80070070 error on Windows 11