Update networks.py

Fix unwanted deletion