fixed invalid task count