fix not all task finish bug