Fixed the refresh sorting