fixed analytical gradient

now analytical and numerical gradient calculations result in the exact
same sumRate