make autocomplete more robust