Merge 1.2 layout fixes into master

This merges the theme layout fixes from the 1.2 branch into master.