Fixed a bug in network assignment.