Adding support for references with a query string.