fix some windows type conversion warning