Sorts properly on three threads