fix for LEFT JOIN