fix for autocomplete bug