How to get the running distance to correspond to the run cycles?

I have two run cycles but the actor will run to long distance in the first run cycle
and then start over from the wrong place!

How to adjust the running distance to the run cycles?
Have a look on the image to get the problem!