improve autocomplete robustness