                         beaconManager.startRangingBeaconsInRegion(beaconRegion)
                         self.updateDisplay()
                     }
-                    self.isInRegion = true
+                    self.isInRegion[name] = true
                     Notify.withMessage("Entering region '\(name)'. Started ranging beacons.")
                 }
                 beaconRegion.exitRegion = {
                     BeaconManager.sharedInstance().stopRangingBeaconsInRegion(beaconRegion)
-                    self.isRanging = false
-                    self.isInRegion = false
+                    self.isInRegion[name] = false
                     self.updateWhenActive()
                     Notify.withMessage("Exited region '\(name)'. Stoped ranging beacons.")
                 }

            BeaconManager.sharedInstance().stopMonitoringAllRegions()
            self.beaconRegions.removeAll(keepCapacity:false)
            self.setScanButton()
            self.isRanging = false
            self.isInRegion = false
        } else {
            self.startMonitoring()
        }

            } else {
                cell.accessoryType = .DisclosureIndicator
            }
        } else  if isBeaconInRegion {
            cell.accessoryType = .None
            cell.rangingActivityIndicator.startAnimating()
        } else {
