Fixed the Orderby bug reported by Marisa