fix free variable substitition in subst