Fixed a mistake with wildcards in word detection