fix bug selection sort