bug fix to dphi, deta, dr