fix sequence bug