some fixes and improvements over wallet api