Correctly validate query responses