Fixed bug where columns were not inserted correctly