Modify from using `.with_index` to using `schedule.id`