fixing url building for queries with no params