Fixing condition in logging.