MSVC fixes

Fix issues on MSVC compilation