fix for query string variables and leftjoin/rightjoin with parameters allowed