diff --git a/lclayout/router.py b/lclayout/router.py
index 5061d4c4684cc37384c6aea57dcaa01bbb1b0b13..b577692f526c63f53e3b8e1a6fe3a21e5337288f 100644
--- a/lclayout/router.py
+++ b/lclayout/router.py
@@ -644,12 +644,14 @@ def _set_terminal_costs(
                     regions_by_layer[layer],
                     tech
                 )
+                logger.debug("via cost: {} ({},{}) {}".format(via_cost,x,y,via_layer))
 
                 other_node = via_layer, (x, y) # Node on the other side of the via.
 
                 if terminal_node in graph and other_node in graph:
                     # Scale the via cost
-                    graph[terminal_node][other_node]['weight'] *= via_cost + 1
+                    logger.debug("Old cost: {} via_cost: {}".format(graph[terminal_node][other_node]['weight'],via_cost))
+                    graph[terminal_node][other_node]['weight'] += via_cost * 1500000
             
 def _report_track_usage(xs: List[int], ys: List[int], routing_trees: Dict[Any, nx.Graph]):
     """
diff --git a/lclayout/writer/magic_writer.py b/lclayout/writer/magic_writer.py
index 9114b800e264f168973ad9749470d21173f8be8f..d82514f9c43e59485f4c33e505c8db7faadc4cb8 100644
--- a/lclayout/writer/magic_writer.py
+++ b/lclayout/writer/magic_writer.py
@@ -126,6 +126,7 @@ def store_layout_to_magic_file(tech_name: str,
     mag_lines = ["magic",
                  "# Generated by librecell",
                  "tech {}".format(tech_name),
+                 "magscale 1 10" if tech_name=='gf180mcuC' else "magscale 1 1", 
                  "timestamp {}".format(int(time.time()))
                  ]