Minor fix to joinwallet function