sorted bug in index