Fixed some Visual Studio analyze warnings
Merged