fix float -> int conversions