misc small fixes