Fix job look up code