Added more careful code to set the first rider index.