should have been using index instead of data.index

I think this was fixed before, but I think it got "unfixed" in one of the merges.