fix query test bug