fixed pausing bugs