MSVC fix for commit 0c2e09c4a71fb2bc3bae580df9e39dacec1c8f0a