Tweaked the period calc.