Fixes #17

Fixed currentPeriod calculation. The currentPeriod is the active period.