fixed a problems where some set where get into related input variables.
also fixed a problem about getting variables from a domain expression.