correctly handle change addresses and other stuff.