fix issues with RigidVar in subst;
encoding mistake (excedentary "or") fixed