Event handler fix