Fold test for batch iterators
Bugs fixed