Fixed the broken query tests.