fixing two warnings, adding orderby