fixed msvc compiler errors