fixed consistent event handling