small tweaks on sort order api