fix bug with query strings