fix wildcard matching issue