Fix left join replacement