fixed a couple of bugs in templates/host/guest_network_register.sh and make it working