Fix typeahead. Fixes #467