Corrections to job priority calculation

This fixes another error in job priority calculations