fixed selection sort and sort tests