fix pausing problem.