fix typo setting couch url when using local-tld and check for correct status code in couchdb response when polling