     @_addingQueue = []
 
     if opts.sharejsDoc
-      @_syncDoc = opts.sharejsDoc
+      @_setShareJSDoc opts.sharejsDoc
 
     if not @collectionId = opts.collectionId
       throw new Error "SharedCollection needs a collectionId in options!"


    @add model, options
    return model

  fetch: (options={}) ->
    # Fetch can be called only once

        options?.success?()

    if options.sharejsDoc
      @_setShareJSDoc options.sharejsDoc

    if @_syncDoc.type.name isnt "json"
      throw new Error "The ShareJS document type must be 'json', not '#{ @_syncDoc.type.name }'"
