Fix wrong wildcard replacement