Sort lists after changing lists.