Fix query string logging