This seems to be working finally, but number of jobs is less than what I
expected. Need to fix it now.