Major bugfix in global.js service