more bug fixes. ready for counterwallet public beta on testnet :)