bugfix leftjoin and right join with vairables