Update TemplateView.php

fixes #1