fix logic for number of "not done" tasks