Fixed bug in batch.py.