Sort lists after modification