Fixed error with logging.