fix query tests