 
     // Can't be private, has to be internal in order to be used as a selector.
     @objc func backgroundContextDidSave(_ notification: Notification) throws {
+        let context = notification.object as? NSManagedObjectContext
+        guard context?.name == backgroundContextName else {
+            return
+        }
+        
         if Thread.isMainThread && TestCheck.isTesting == false {
             throw NSError(info: "Background context saved in the main thread. Use context's `performBlock`", previousError: nil)
         } else {

     */
    @objc public func newBackgroundContext() -> NSManagedObjectContext {
        let context = NSManagedObjectContext(concurrencyType: DataStack.backgroundConcurrencyType())
        context.persistentStoreCoordinator = self.persistentStoreCoordinator
        context.undoManager = nil
        context.mergePolicy = NSMergeByPropertyStoreTrumpMergePolicy

    private var model: NSManagedObjectModel

    private var containerURL = URL.directoryURL()

    private let backgroundContextName = "DataStack.backgroundContextName"

    /**
     The context for the main queue. Please do not use this to mutate data, use `performInNewBackgroundContext`
