Fixing issues with autocomplete