Feature/860 too many batch jobs

Fix for #860. @njjc, ready for you to take a look.