Some small fix for autocomplete