fixed logic error on driver index