Fixed typeahead trying to load when element did not exist