fix int overflow when passing double arguments