Fixed event handling for global emit