Fixed template delete