     private var searchControllerIsActive: Bool {
         return searchController?.active ?? false
     }
+    private var searchControllerWasActive: Bool = false
 
     private let keyboardMan = KeyboardMan()
     private var normalContactsTableViewContentInsetBottom: CGFloat?

        #if DEBUG
            //view.addSubview(contactsFPSLabel)
        #endif
    }

    // MARK: Actions

            tableView.deselectRowAtIndexPath(indexPath, animated: true)
        }

        //searchController?.active = false
        //searchController?.resignFirstResponder()

        guard let section = Section(rawValue: indexPath.section) else {
            return
