diff --git a/classes/exporters/CourseDateAndRoomBookingExporter.class.php b/classes/exporters/CourseDateAndRoomBookingExporter.class.php
index 2368961c57975dacdd91e3de6f28cb50231aef1f..1f3b3b9c0cf66d1694e2b6df07d9a30174a63b45 100644
--- a/classes/exporters/CourseDateAndRoomBookingExporter.class.php
+++ b/classes/exporters/CourseDateAndRoomBookingExporter.class.php
@@ -843,24 +843,50 @@ class CourseDateAndRoomBookingExporter extends Exporter
             $bookings_stmt->execute($bookings_stmt_params);
             $result = $course_dates;
             foreach ($bookings_stmt->fetchAll(\PDO::FETCH_ASSOC) as $row) {
+                //We must keep the key order or the CSV output formatter will
+                //ruin the output:
+                $result_row = [];
+                if ($with_begin) {
+                    $result_row['begin'] = $row['begin'];
+                }
+                if ($with_end) {
+                    $result_row['end'] = $row['end'];
+                }
+                if ($with_course_date_id) {
+                    $result_row['course_date_id'] = '';
+                }
+                if ($with_course_id) {
+                    $result_row['course_id'] = '';
+                }
+                if ($with_status) {
+                    $result_row['status'] = $row['status'];
+                }
+                if ($with_today) {
+                    $result_row['today'] = $row['today'];
+                }
+                if ($with_room_name) {
+                    $result_row['room_name'] = $row['room_name'];
+                }
+                if ($with_booking_description) {
+                    $result_row['booking_description'] = $row['booking_description'];
+                }
                 if (isset($row['range_id'])) {
                     if ($row['range_id']) {
                         //We must check whethet the range-ID represents a course-ID
                         //or a course date ID.
                         if ($with_course_date_id) {
                             if (\CourseDate::exists($row['range_id'])) {
-                                $row['course_date_id'] = $row['range_id'];
+                                $result_row['course_date_id'] = $row['range_id'];
                             }
                         }
                         if ($with_course_id) {
                             if (\Course::exists($row['range_id'])) {
-                                $row['course_id'] = $row['range_id'];
+                                $result_row['course_id'] = $row['range_id'];
                             }
                         }
                     }
-                    unset($row['range_id']);
                 }
-                $result[] = $row;
+                $result[] = $result_row;
             }
         }
 
diff --git a/plugin.manifest b/plugin.manifest
index 8cb34a329a3cad722995e255938b353422e820c2..bbea03cc85334c3ab3d4c85133fccaec3e0ae7bc 100644
--- a/plugin.manifest
+++ b/plugin.manifest
@@ -1,7 +1,7 @@
 pluginname=Flexexport
 pluginclassname=Flexexport
 origin=data-quest
-version=0.6.8
+version=0.6.9
 studipMinVersion=4.3
 studipMaxVersion=4.9.99
 description=Das Flexexport-Plugin erlaubt den Export von Stud.IP-Inhalten in verschiedenen Formaten.