Fix reordering problems.