AE: Be more safe when setting a period size