Correcting MSVC compiler errors