Enhanced the way of updating candList, though there is still a bug of uncleared stack.