Fix query + extra parameter concatenation issue flagged by test getQueryAndParams