Template engine fix