Fixed a possible NPE bug by changing to using a synchronized map for the jobs