Fix bug in typeahead macro.