Moved typeahead initialisation into rendered and added check against multiple intiialisation.