Fixed a bug in batchRun script