Fixed issues related to autocomplete querying.