some small adjustments to autocomplete