End calculation in get_jobs_ids in fixed. Length is respected