Removed unused variable from togglePause