fixing index order.