fix position of indices