Fixes to logging.