fixed the double joining bug