fix to stop pollution

You were taking the keys in params('query'), but still taking the values off params(), hence the pollution. :-)