Fix integer type conversions