Fix issues with spawning slaves for untied jobs

I have not tested this completely. It seems to work for me, but I rebased before making this pull request.