fixed a performance problem being caused by a recursive check for uncompleted tasks