Repairing some breakages in global.js