Fixes in indexes and read_data