Pull #5 - Proper event handling