Be more intelligent about jobs addition.
Fix upgrade counter.
Fix priorities for upgrade.