Attempting to make autocomplete more robust