fixed issue with logging.