Updated batch run code.