Fix ping-pong animations with negative speed/time