fix variable name in UNIQUE handling