title: Getting header errors while trying to add mongoose subdocument
body: <p>I am receiving the Error: <code>Can't set headers after they are sent</code>.  I know it's coming from this POST call, However, I cannot figure out where it's coming from.  Is there anyone who knows how to troubleshoot this?  For reference, address is a subdocument of member and both have mongoose definitions.  if someone could help me understand why this error is happening, I would be greatly appreciated.</p>
  
  <pre><code>.post(function(req, res) {
    member.findById(req.params.member_id, function(err, result) {
      if (err)
        return (err);
  
      new_address = {
        street1 : req.body.street1,
        street2 : req.body.street2,
        City : req.body.City,
        State : req.body.State,
        Zip : req.body.Zip,
        Lat : req.body.Lat,
        Lng : req.body.Lng
      };
  
      if(result.address === undefined){
        result.address.push(new_address);
      }
      else{
        result.address = [new_address];
      }
  
      result.save(function(err) {
          if (err)
              res.send(err);
  
          res.json({ message: 'Address created!!!' });
      });
  
    });
  
  });
  </code></pre>