fix int cast