couchdb document deletion failure fix