fixed another bug in the Differentiate.