Corrected event object handling