fix unable to stop task when it is queuing