Fix ID_period indexing.