Solve indices problem