fix bug on autocomplete