fixed msvc warnings, second attempt