Sort the updated list to ensure consistency