handle malformed query string