adds another test for query_ref because they didn't seem to be working right