bugfix in farm reassignation and cleanup

2 jobs for master in 3 minutes and 56 seconds (queued for 4 seconds)