fix trendForecast and clearPeriods