Update network.py

small fixes for windows 7