Sort auto-completion elements