Fix bugs in deployment of networks.