Fix batch querying.