Update core.js

bugfix