More fixes for logging.