                         }
                     }
                     dispatch_async(dispatch_get_main_queue()) {
+                        self.refreshingData = false
+                        println("################################################## FALSE")
                         MBProgressHUD.hideHUDForView(self.view, animated: true)
                         println("Counter = \(--self.hudCounter)")
                         self.refreshControl.endRefreshing()

                        self.emptyNotificationsView.hidden = false
                    }
                    dispatch_async(dispatch_get_main_queue()) {
                        MBProgressHUD.hideHUDForView(self.view, animated: true)
                        println("Counter = \(--self.hudCounter)")
                        self.tableView.reloadData()

        refreshControl = UIRefreshControl()
        refreshControl.addTarget(self, action: "refreshData", forControlEvents: UIControlEvents.ValueChanged)
        tableView.addSubview(refreshControl)
    }
    
    override func viewWillAppear(animated: Bool) {
        super.viewWillAppear(true)
        segmentedControl.selectedSegmentIndex = 0
        segmentedControlValueChanged(segmentedControl)
        MBProgressHUD.hideHUDForView(self.view, animated: true)
    }
    
    override func viewDidAppear(animated: Bool) {
