Fixed error in create wallet

Fixes #1992