Fix submit_job to work with namespaces