Make an Enum for the Events.
Fix a crash for bad_weak_ptr