Fixed msvc warnings

Compiled with msvc 2013.