Fix compiler warnings on visual studio