Pruned the query out of the integrity error.

@liguo @alainjobart @plobsing