minor cleanup in core