fixed dataframe indexing issue, no more NaNs