fix multiple references with non-greedy regex