bug fix stop when task is done