MSVC compilatio fixes