very ugly fix to duplicate job launching and nice fix for detached jobs avoiding defunct processes