diff --git a/quicktabs.classes.inc b/quicktabs.classes.inc
index 56c2569..a732244 100644
--- a/quicktabs.classes.inc
+++ b/quicktabs.classes.inc
@@ -188,7 +188,8 @@ class QuickSet {
       $renderable_contents = 0;
       foreach ($this->contents as $key => $tab) {
         $contents = $tab->render(TRUE);
-        if (empty($contents)) {
+        reset($contents);
+        if (empty($contents[key($contents)])) {
           // Rather than removing the item, we set it to NULL. This way we retain
           // the same indices across tabs, so that permanent links to particular
           // tabs can be relied upon.
@@ -513,4 +514,4 @@ class QuickPreRenderedContent implements QuickContentRenderable {
  */
 class InvalidQuickSetException extends Exception {
   
-}
\ No newline at end of file
+}
