Fix timeperiod tests