fixing issue in core.js