important fixes. wasn't incrementing the batch!