fix sort by for results