Added extra catch to waiting to submit jobs.