Fixed bug in handling of array jobs.