fix int overflow.