Fix issues in core.js.