sort by fixes