Fix perform-query tests