fix bug with couchdb result parsing