bugfix in batch.run