fixed variable naming in batch generator