             savePanel.allowedFileTypes=["json"]
         }
         savePanel.beginWithCompletionHandler({ (result) in
-            if result==NSFileHandlingPanelOKButton{
-                if let url = savePanel.URL {
-                    if let filePath=url.path {
-                        self.exportMetadataTo(filePath,crypted: crypted, handlers:handlers)
+            dispatch_async(dispatch_get_main_queue(), {
+                if result==NSFileHandlingPanelOKButton{
+                    if let url = savePanel.URL {
+                        if let filePath=url.path {
+                            self.exportMetadataTo(filePath,crypted: crypted, handlers:handlers)
+                        }
                     }
                 }
-            }
+            })
         })
     }
 

                                                    do {
                                                        if let instance=try Bartleby.defaultSerializer.deserializeFromDictionary(itemRepDictionary) as? Collectible{
                                                            if let user:User=instance as? User{
                                                                 // We donnot want to expose the document current user
                                                                if user.creatorUID != user.UID{
                                                                    proxy.upsert(instance,commit:false)
                                                                }

                    }
                }
            }
            
        }) { (context) in
            
            handlers.on(Completion.failureStateFromJHTTPResponse(context))
        }
        
    }
    
    
}
