Fixing bugs in the data-core.js