fixed logic for match_words for composite filter