fix paused function