fix bug in addStateSeq