Fix pausing behaviour