attempt to fix out of order elements.