Fix links for references with hashes