fix regression for autocomplete with empty prefix