diff --git a/lib/google_visualization.rb b/lib/google_visualization.rb
index <HASH>..<HASH> 100644
--- a/lib/google_visualization.rb
+++ b/lib/google_visualization.rb
@@ -36,10 +36,10 @@ module GoogleVisualization
               output += generate_visualization(id, vis[0], vis[1], vis[2])
             end
       output += "} </script>"
+      output + "<!-- Rendered Google Visualisations /-->"
     end
-    output + "<!-- Rendered Google Visualisations /-->"
   end
-  
+
   ########################################################################
   # Call this method from the view to insert the visualization data here #
   ########################################################################
Don't crash if there were no visualizations to render.