Fix periodic bug.