sync and wallet writing improvements
unrestricted fix