Fixed bug where columns were output as first row in tables