fixed bugs in shells_dispatch_self regarding number of batch jobs to compute