Fix 0x80070216 error on Windows 11/10