Fixed error when period is not in series