Fix motion path effect when sampling at end of interval

I was getting funny effects when hitting the end of the interval and errors in the console.