DynamicNetwork capcity optimizations and two small bugfixes.