Fix bug in LocalJobs procedure.  Improve speed.