Fix fuzzy matching of flags