small fixes to core