lots of small fixes...