networks read in as an array, fix cleanup

Change-Id: I6f2559be6766e243cf0fb93e15ea09396a093f49