Improved msvc compatibility