diff --git a/lib/common/htmlparse.y b/lib/common/htmlparse.y
index 668a737..06d9622 100644
--- a/lib/common/htmlparse.y
+++ b/lib/common/htmlparse.y
@@ -598,7 +598,7 @@ table : opt_space T_table {
           $2->u.p.rows = dtopen(&rowDisc, Dtqueue);
           HTMLstate.tblstack = $2;
           $2->font = dupFont (HTMLstate.fontstack->cfont);
-          $$ = $2;
+          $<tbl>$ = $2;
         }
         rows T_end_table opt_space {
           if (nonSpace(agxbuse(HTMLstate.str))) {
