fix logging.