Sort works, but losing 2 elements for some reason
Threaded sorting working. Fixed bug exluding last few values