bug fix in core.register