Fix MSVC related issues