fixes to bv substitution with explanations