fixing more sort errors