minor fixes

minor fixes in core code