fixed typeahead bug. Initial setup was being done before element was on the page