Removed pwalletMain. Using pWalletMap->GetDefaultWallet() instead.