Small fix for getAutoCompleteTerms