Fixed Index sorting issue