fix JS bug when deactivating label selection.