Debug the ORDERBY bugs