Fix a bug with typeahead not enabled