fix subst on nrep bug