Some improvements for the network connection