Checking for wallet initialization and fixing tests