Fix stats collection in PartitionSender and ScanBatch