fix fetch_all operation producing ? at the end of uri when no query was s...

...ent