fix typo in pause() function