fix delete resource