Fix sort by labels.