Fix a bug with getJobs handler