bunch of small fixes.