fixed bug for joining