Fix query string construction.