Fix the order in which the inner elements are tagged