RefInputVars bug fixed