Fix CSV export to work with SqliteTableModel