Reinstated the code to limit the number of jobs that can
be concurrently running.