fixed a problem about getting variables from a domain expression