Changed the condition to insert a spacer only when a table row has at least two cells, preventing out-of-bounds errors when accessing the second cell.
Changed the condition to insert a spacer only when a table row has at least two cells, preventing out-of-bounds errors when accessing the second cell.