fixes issue #1; the Database.update function fails for Documents that are unstructured - see Issue #2