fixed wrong Selection after sorting a grid in main window