small fixes, extra tests