do proper cleanup when all jobs are done