save resolves object instead of document