multiple small fixes