fix the sortorder hack