Fixes for improperly nested elements.