Fixed the logging.