         )
 
         setter = {}
-        newDoc = EJSON.parse EJSON.stringify oldDoc ? {_id: instanceId}
+        newDoc = EJSON.parse EJSON.stringify oldDoc ? {_id: doc._id}
         for fieldName, newValue of fields
             if newValue isnt undefined
                 setter[fieldName] = newValue
                 newDoc[fieldName] = newValue
 
-        modelClass.collection.upsert instanceId,
+        modelClass.collection.upsert doc._id,
             $set: setter
 
         if not _reserved
-            J.denorm.resetWatchers modelName, instanceId, oldDoc ? {_id: instanceId}, newDoc
-
-        instanceId
+            J.denorm.resetWatchers modelName, doc._id, oldDoc ? {_id: doc._id}, newDoc
+
+        doc._id
 
     _jRemove: (modelName, instanceId, oldDoc = null) ->
         # This also runs on the client as a stub

        unless @alive
            throw new Meteor.Error "Can't call toDoc on dead #{@modelClass.name} instance"

        doc = J.Model.toSubdoc(@_fields.toObj(), denormalize)

        if denormalize and @modelClass.idSpec is J.PropTypes.key
            key = @key()



Meteor.methods
    _jSave: (modelName, doc) ->
        # This also runs on the client as a stub

        J.assert doc._id?
        modelClass = J.models[modelName]

        fields = _.clone doc
        delete fields._id

        _reserved = modelName in ['JDataSession']

        if not _reserved
            console.log 'jSave', modelName, doc, @isSimulation

        # TODO: Validation

        if @isSimulation
            modelClass.collection.upsert doc._id,
                $set: fields
            return

        oldDoc = modelClass.findOne(
            doc._id
        ,
            fields:
                _reactives: 0
