Fixes delete method of resource.