Fix `get_last_period`;