Fix crash bug with recently added logging.