fixed a bug with indexes
trying to fix bug on getting NaNs for an id