Fix listNetworks functionality