Fix completedTasks counter method