Parallel sorting working but invalid