Further fixes to logging.