Fix network endpoint resolution

fix #112