fixed unmatched old and new states length