MSVC related fixes