fixed sort index issue