Fix some problems with the job pool
Now I think it's fixed for real
Now I think it's fixed for real
*NOW* it no longer crashes when emptying the job pool