some MSVC2012 compiler fixes