Tweeked Selection Sort to fix Deadlock/bug

Selection sort faulted when sorting larger data sets.  Could freeze.
Seems to be resolved.