fix and order index