Duplicate event handler fix