fixed period_choice BUG, it was not looping