fix docs and bug in intial lnP and grad in fortran version