fix period_end of era()