added removeGlobalEventHandler