Fixes for errors ignored by MSVC