Changed the way label and values are handled in different cases