fix vector data indexing