fix undo_state_test, your chain could be longer than my chain