Remove orderby in if stmt