Fix bug: the drop-down box is empty when there is only one value in data