fix checking for attribute on word filter