fixing bugs in latest version of async event handling