fix bug with updating labels