fix critical bug relative to query string