diff --git a/geant/gap_ansible/roles/bc_templates/routers/nokia/cflowd.j2 b/geant/gap_ansible/roles/bc_templates/routers/nokia/cflowd.j2
index 7fa1eb0a60a4fa70cc7635499103f775b1aff8e2..d1595c208db94e9cc55a9e75f4f89d4048ff768e 100644
--- a/geant/gap_ansible/roles/bc_templates/routers/nokia/cflowd.j2
+++ b/geant/gap_ansible/roles/bc_templates/routers/nokia/cflowd.j2
@@ -1,5 +1,5 @@
 <cflowd xmlns="urn:nokia.com:sros:ns:yang:sr:conf" xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:nokia-attr="urn:nokia.com:sros:ns:yang:sr:attributes" alu:operation="replace">
-    <cache-size>{{ cflowd.basic.cache_size }}</cache-size>
+    <cache-size>{{ cflowd.basic.cache_size[router_tier] | default(1000000) }}</cache-size>
     <enhanced-distribution>{{ cflowd.basic.enhanced_distribution }}</enhanced-distribution>
     <overflow>{{ cflowd.basic.overflow }}</overflow>
     <template-retransmit>{{ cflowd.basic.template_retransmit }}</template-retransmit>
@@ -10,8 +10,10 @@
     <sample-profile>
         <profile-id>{{ profile.id }}</profile-id>
         <sample-rate>{{ profile.sample_rate }}</sample-rate>
-        {% if router_tier in profile.metering_process_map %}
+        {% if profile.metering_process_map is defined %}
+          {% if router_tier in profile.metering_process_map %}
         <metering-process>{{ profile.metering_process_map[router_tier] }}</metering-process>
+          {% endif %}
         {% endif %}
     </sample-profile>
       {% endfor %}