adrianosmond's typeahead fixes

https://github.com/adrianosmond/typeahead.js/tree/fd7ff605590301c241a5a9ce3ead67f68f908013