Fixed the example for events