Correct event handling.