Fixed task stop issue