Update SG-core.js