tweak so desired cells and batch.idx length hit the same number

to maximize ram, hopefully speed up process
close the no data if statement brace