fix ps index sorting