fixed 100% CPU bug when paused