Fixed host delete function