fixing how nectar.js determines ws service endpoint