Fixed autocomplete bug for text fields