Fix some bugs with wallet restore from seed.