stop: fixed infinite loop issue when task are not immediately killed.