keep selected item when sorting