Fixed PGH to avoid NaN.