             }
             
             self.previousSearchResults = nil
+            
+            self.refreshControl?.endRefreshing()
         }
     }
     

            
            if self.previousSearchResults == nil {
                
                self.tableView.reloadData()
            }
            else {
                

    public func controller(controller: SearchResultsController, didPerformSearchWithError error: NSError?) {
        
        NSOperationQueue.mainQueue().addOperationWithBlock { () -> Void in
                        
            // show error
            if error != nil {
                
                self.refreshControl?.endRefreshing()
                
                self.showErrorAlert(error!.localizedDescription, retryHandler: { () -> Void in
                    
                    self.refresh(self)
