fixes for couchDB