Fix default period bug