corrected typeahead functionality for AJAX searches