fix cpu starving bug