Fix order of elements in expanded lists