fix subst engine