fix issue with task count