Avoid crash in logging.