More sort fixes