diff --git a/inc/parser/handler.php b/inc/parser/handler.php
index 8639c5ad843b41f9aa4f5dafc1e98a121aa34f71..8de0c74902b5895ee42b02106b2ba6139ae44da5 100644
--- a/inc/parser/handler.php
+++ b/inc/parser/handler.php
@@ -1175,7 +1175,7 @@ class Doku_Handler_Table {
                     $this->tableStart($call);
                 break;
                 case 'table_row':
-                    $this->tableRowClose(array('tablerow_close',$call[1],$call[2]));
+                    $this->tableRowClose($call);
                     $this->tableRowOpen(array('tablerow_open',$call[1],$call[2]));
                 break;
                 case 'tableheader':
@@ -1183,7 +1183,7 @@ class Doku_Handler_Table {
                     $this->tableCell($call);
                 break;
                 case 'table_end':
-                    $this->tableRowClose(array('tablerow_close', array()));
+                    $this->tableRowClose($call);
                     $this->tableEnd($call);
                 break;
                 default:
@@ -1221,7 +1221,7 @@ class Doku_Handler_Table {
                 break;
             }
         }
-        $this->tableCalls[] = $call;
+        $this->tableCalls[] = array('tablerow_close', array(), $call[2]);
 
         if ( $this->currentCols > $this->maxCols ) {
             $this->maxCols = $this->currentCols;
@@ -1281,17 +1281,21 @@ class Doku_Handler_Table {
         // that contain colspans
         foreach ( $this->tableCalls as $key => $call ) {
 
-            if ( $call[0] == 'tablerow_open' ) {
+            switch ($call[0]) {
+            case 'tablerow_open':
 
                 $lastRow++;
                 $lastCell = 0;
+                break;
 
-            } else if ( $call[0] == 'tablecell_open' || $call[0] == 'tableheader_open' ) {
+            case 'tablecell_open':
+            case 'tableheader_open':
 
                 $lastCell++;
                 $cellKey[$lastRow][$lastCell] = $key;
+                break;
 
-            } else if ( $call[0] == 'table_align' ) {
+            case 'table_align':
 
                 $prev = in_array($this->tableCalls[$key-1][0], array('tablecell_open', 'tableheader_open'));
                 $next = in_array($this->tableCalls[$key+1][0], array('tablecell_close', 'tableheader_close'));
@@ -1315,8 +1319,9 @@ class Doku_Handler_Table {
 
                 // Now convert the whitespace back to cdata
                 $this->tableCalls[$key][0] = 'cdata';
+                break;
 
-            } else if ( $call[0] == 'colspan' ) {
+            case 'colspan':
 
                 $this->tableCalls[$key-1][1][0] = false;
 
@@ -1336,8 +1341,9 @@ class Doku_Handler_Table {
                 $toDelete[] = $key-1;
                 $toDelete[] = $key;
                 $toDelete[] = $key+1;
+                break;
 
-            } else if ( $call[0] == 'rowspan' ) {
+            case 'rowspan':
 
                 if ( $this->tableCalls[$key-1][0] == 'cdata' ) {
                     // ignore rowspan if previous call was cdata (text mixed with :::) we don't have to check next call as that wont match regex
@@ -1362,8 +1368,10 @@ class Doku_Handler_Table {
 
                     $toDelete[] = $key-1;
                     $toDelete[] = $key;
-                    $toDelete[] = $key+1; 
+                    $toDelete[] = $key+1;
                 }
+                break;
+
             }
         }