fixing substitution