Added sorting results in completion
fixed bug when not clearing matches list