fixed batchrows memory issue