restore entity sorting