Fixed MSVC related issues