                 return
             }
             self.updateSearchSuggestions(withCompletions: [])
+            self.isWaitingForSearchSuggestionUpdate = false
         }) { (searchResult) in
             guard text == self.searchBar?.text else {
                 return
             }
             
             let completions = self.handleCompletion(searchResults: searchResult.results ?? [])
+            self.isWaitingForSearchSuggestionUpdate = false
             guard completions.count < 10 else {
                 return
             }

    
    func searchBar(_ searchBar: UISearchBar, textDidChange searchText: String) {
        updateSearchSuggestions(withCompletions: searchSuggestionController.searches[3])
        NSObject.cancelPreviousPerformRequests(withTarget: self)
        perform(#selector(updateSearchCompletionsFromSearchBarText), with: nil, afterDelay: 0.2)
    }

    }
    
    func searchBarSearchButtonClicked(_ searchBar: UISearchBar) {
        searchBar.endEditing(true)
        guard !isWaitingForSearchSuggestionUpdate else {
            isGoingToSearchForFirstSearchSuggestionAfterUpdate = true
            return
        }
        searchForFirstSearchSuggestion()
    }
    
    func searchBarTextDidEndEditing(_ searchBar: UISearchBar) {
