fix error when no query string