Small fixes in core