started to check the implimentation of g(r,r'). It seems that the intergrations is again making problems.
g(r,r1) should now return 1 when integrating from with r1 = r.