Fixed error with never ending selecting item after sorting