#126 Fix bug when edit period