fixing some small bugs in core