Fix a few notices in the theme engine.