Fixed debug logging.