Fixed pullTasks() function to return only jobs that are incomplete and not in progress