fix sort of results