fixed selectionSort