Fix bug with job submit process