fix to job manager, strange logic