fixing indexes