         }
       }
     }
-    
+
     return notification
   }
   

  }

  public func fetch() throws {
    func completionBlock(result: NSAsynchronousFetchResult) {
      self.sectionize(result.finalResult as? [E] ?? [])
			eventObserver?.sendNext(.Reloaded)


      return
    }

		if !fetchedObjects.isEmpty {
			var ranges: [(range: Range<Int>, name: ReactiveSetSectionName)] = []

			// Objects are sorted wrt to sections already.
      for position in fetchedObjects.startIndex ..< fetchedObjects.endIndex {
        let sectionName = ReactiveSetSectionName(fetchedObjects[position].valueForKeyPath(keyPath) as? String)

				if ranges.isEmpty || ranges.last?.name != sectionName {
					ranges.append((range: position ..< position + 1, name: sectionName))
				} else {
					ranges[ranges.endIndex - 1].range.endIndex += 1
				}
      }

			sections.reserveCapacity(ranges.count)

			for (range, name) in ranges {
				let section = ObjectSetSection(name: name, array: Array(fetchedObjects[range]))
				sections.append(section)
			}
		}

    isFetched = true
  }
  
