Fix global handling