Fixed leapfrog bug