fix bug out-of-index at last jobs

Don't queue new jobs when there's no new jobs available