fix json sending to couch