making RunningJobManager class more efficient and less resource-wasting.