bug fix in core