Dont crash when autocomplete with in the end of query