fix for wallet bug