Fixed template render on error