Keep track of frames, make sure to cancel the next frame when pausing