Fix rounding error on pi. StatsPhase now working on pi