fix #1406. fix #1431. set recurring_period first before setting other attributes