fix int typecast