         set(value: subject.filter, for: QueryParameterKeys.subject, in: &params)
         environment?.analytics.trackSubjectDiscovery(subjectID: subject.filter)
         if let url = DiscoveryWebViewHelper.buildQuery(baseURL: baseURL.URLString, params: params) {
+            searchBar.resignFirstResponder()
             loadController.state = .Initial
             loadRequest(withURL: url)
         }

    }
    
    func searchBar(_ searchBar: UISearchBar, textDidChange searchText: String) {
        guard discoveryType == .program,
            searchText.isEmpty,
            webView.url != baseURL,
            let baseURL = baseURL else { return }
        loadRequest(withURL: baseURL)
    }

    func searchBarSearchButtonClicked(_ searchBar: UISearchBar) {

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