Update TemplateEngine.php