Fix issue with resource remove events