Correction of the template to delete function