This fixes a bug in `pause()` that canceled the pause task instead of the play task. This issue prevented the animation from being paused while a play task is scheduled.