Refactored not to reset global result instance ids to null when job is finished.