fixed orderby bug