Adjustment to template delete method