Fix for bug in logging.