Fixed a bug with analysis period

Fixed an analysis period bug.