Fixed hasOutstandingJobs bug