fixed core.js problems