fix query test cases