Fixed corner case bug in left join