Fixed event handling.