a few small fixes for logging