fix autocomplete loading bug