sort tags for autocomplete