fixed small bug in pause functionality