 
 
   add: (models, options) ->
-    if models.length is 0
+
+    if not models or models.length is 0
       return this
 
-    if _.isArray models
-      for m in models
-        @_sendModelAdd m, options
-    else
-      @_sendModelAdd models, options
+    if not _.isArray models
+      models = [ models ]
+
+    if not @fetched
+      while model = models.shift()
+        debugger
+        console.log "Adding #{ model.get "name" } to queue"
+        @_addingQueue.push model
+      return this
+
+    for m in models
+      @_sendModelAdd m, options
 
     super
 

    if not model.collection
      model.collection = this


    @add model, options
    return model


  fetch: (options={}) ->

    if options.sharejsDoc
      @_syncDoc = options.sharejsDoc

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


    if @_syncDoc.created
      @_initSyncDoc callbackWrapper
    else
      @_loadModelsFromSyncDoc callbackWrapper

    @_bindSendOperations()



    # And also bind receive operations:
