small changes in CouchDbWrapper