Patches to fix global.