all kinds of small fixes.