few improvements for query string.