reworked cause of bug in core