Fixes to make template peices work when user needs to use visual editor.