Fix a bug where events were being called on an element that has been deleted.