fix terminate condition for triRadixSort