         var query = baseURL
         for param in params {
             let join = query.contains("?") ? "&" : "?"
-            query = query + join + param.key + "=" + param.value
+            let value = param.key + "=" + param.value
+            if !query.contains(find: value) {
+                query = query + join + value
+            }
         }
         
         return URL(string: query)

import WebKit

fileprivate enum QueryParameterKeys {
    static let searchQuery = "search_query"
    static let subject = "subject"
}


    }
    
    func searchBar(_ searchBar: UISearchBar, textDidChange searchText: String) {
        guard searchText.isEmpty,
            webView.url != baseURL,
            let baseURL = baseURL,
            var params = params, params[QueryParameterKeys.searchQuery] != nil else { return }

        removeParam(for: QueryParameterKeys.searchQuery, in: &params)

        if let URL = DiscoveryWebViewHelper.buildQuery(baseURL: baseURL.URLString, params: params) {
            loadRequest(withURL: URL)
        }
    }

    private func removeParam(for key: String, in params: inout [String: String]) {
        params.removeValue(forKey: key)
    }

    func searchBarSearchButtonClicked(_ searchBar: UISearchBar) {
