fixed a bug in obtainCapacityNetwork