fixed logic for error of number of "not done" tasks