fix for complex tables (rows with small number of columns)