Fixing bugs in saving of labels.