Fix the QueryHelper and the test