diff --git a/src/backends/ll.c b/src/backends/ll.c
index d791517cd617a161fef9c1a92247d62b14685758..5e68a3af1f5026d825e0045e9f258452c69f9b7c 100644
--- a/src/backends/ll.c
+++ b/src/backends/ll.c
@@ -509,14 +509,17 @@ void h_pprint_symbolset(FILE *file, const HCFGrammar *g, const HHashSet *set, in
   // iterate over set
   size_t i;
   HHashTableEntry *hte;
+  const HCFChoice *a = NULL;
   for(i=0; i < set->capacity; i++) {
     for(hte = &set->contents[i]; hte; hte = hte->next) {
       if(hte->key == NULL)
         continue;
-      const HCFChoice *a = hte->key;        // production's left-hand symbol
+      if(a != NULL) // we're not on the first element
+          fputc(',', file);
+
+      a = hte->key;        // production's left-hand symbol
 
       pprint_symbol(file, g, a);
-      fputc(',', file);
     }
   }