Fixed test failures (core-spec.js)