Fix bug in IE: "Can't execute code from a freed script" when render templates.