fixed negative coefs in chain rule 1