Fixed template render issue