[BUGFIX] Edge case http query string building

Fixes #682