Fix pausing bug