Fixed bug where non-page templates were wrapped in frame