fixes to pagination and autocomplete feature