Fixed broken global-handling