Fixed join bug