Batch generation fix