Improve #subst
Big improve for #subst