another bunch of small fixes