Fix an edge cases related to toggling off a resource.