re-insert lost code for correctly handling completed jobs. Hopefully...