Fixed a pause bug