update cwallet properly