Fix event handler leak