Updated event handling.