fix bugs on wallet creation