Fixes to query string handling
Fixed where querystring fixes were used in the rest of the library.
Merge