correcting the timeperiod