various small fixes