fix compile warnings for Visual Studio