fix selection sort