Subject: fixed bug while rollover

Description:
1) final_flag refer befor assignment error