Fix delete_resource