Fixes in MSVC
MSVC: all seems to build ok & tests pass