fallback to nearest index when not found
this is a small fix that falls back to the closest value when the original index could not be estimated
this is a small fix that falls back to the closest value when the original index could not be estimated