fix a bug in sequencer