Fix bugs in job submission scripts.