fix periodicity check