     Form.setUpReactivity = (template) ->
       template = getTemplate(template)
       docs = Form.getDocs()
-      doc = template.data.doc
+      doc = template.data?.doc
       template.reactiveDoc = new ReactiveVar(doc)
       template.getReactiveDoc = Form.getReactiveDoc.bind(template)
       # If no docs exist, no reactive updates can occur on them.


    Form.setUpDocs = (template) ->
      template = getTemplate(template)
      data = template.data
      template.docs = Form.parseDocs(template)
      data.doc = Form.getValues(template)
      template.origDoc = Setter.clone(data.doc)

    Form.updateDocs = (template) ->
      template = getTemplate(template)
      data = template.data
      docs = _.map template.docs, (doc) -> Form.getCollection().findOne(doc._id)
      template.docs = docs
      data.doc = Form.getValues(template)

    origCreated = Form.created
    Form.created = ->
      origCreated?()
      @settings = @data?.settings ? {}
      Form.setUpDocs(@)
      if Form.isReactive() then Form.setUpReactivity()
      @isSubmitting = false
