fix sortIndex