diff --git a/templates/my.cnf.epp b/templates/my.cnf.epp
index 7371164c3..529b77000 100644
--- a/templates/my.cnf.epp
+++ b/templates/my.cnf.epp
@@ -7,7 +7,7 @@
 <%- if ($vi[0] == 'ssl-disable') or ($vi[0] =~ /^ssl/ and $v[1]['ssl-disable'] == true) or ($vi[0] =~ /^ssl-/ and $v[1]['ssl'] == false) { -%>
 <%- next -%>
 <%- } elsif $vi[1] == true or $vi[1] == '' { -%>
-<%= $vi[0] -%>
+<%= $vi[0] %>
 <%- } elsif type($vi[1]) =~ Type[Array] { -%>
 <%- $vi[1].each |$vii| { -%>
 <%-$base = $vi[0]-%>
@@ -15,11 +15,12 @@
 <%- } -%>
 <%- } elsif !($vi[1] ==nil or $vi[1]=='' or $vi[1]==undef) { -%>
 <%-$base = $vi[0]-%>
-<%= $base %> = <%= $vi[1] -%>
-<% } %>
-<% } %>
-<% } %>
-<% } %>
+<%= $base %> = <%= $vi[1] %>
+<% } -%>
+<% } -%>
+<% } -%>
+<%# Empty line between sections %>
+<% } -%>
 <% if $includedir and $includedir != '' { -%>
 !includedir <%= $includedir %>
 <% } -%>