fixed bug 267 index sort