fix integer conversion warnings