Compile fix when using MSVC compiler