fixed the indexed data problem