fixed template destroyed