Fixed join statements