Update the label logic.