template var "query" and "query_string" fix