Fixed join bugs