Update hasUnfinishedTasks implementation