Fix sequence bug