Fixed bug about Analysis Period

Fixed a bug that was not referencing the analysis period correctly.