diff --git a/backup/import.php b/backup/import.php
index 4cc57345f1e..e3926e38f5d 100644
--- a/backup/import.php
+++ b/backup/import.php
@@ -69,7 +69,10 @@ if ($importcourseid === false || $searchcourses) {
 
     // show the course selector
     echo $OUTPUT->header();
-    echo $renderer->import_course_selector($url, $search);
+    $backup = new import_ui(false, array());
+    echo $renderer->progress_bar($backup->get_progress_bar());
+    $html = $renderer->import_course_selector($url, $search);
+    echo $html;
     echo $OUTPUT->footer();
     die();
 }
diff --git a/backup/util/ui/base_ui.class.php b/backup/util/ui/base_ui.class.php
index 2c563f0b8ed..41260bab989 100644
--- a/backup/util/ui/base_ui.class.php
+++ b/backup/util/ui/base_ui.class.php
@@ -90,8 +90,11 @@ abstract class base_ui {
         $this->controller = $controller;
         $this->progress = self::PROGRESS_INTIAL;
         $this->stage = $this->initialise_stage(null, $params);
-        // Process UI event before to be safe.
-        $this->controller->process_ui_event();
+
+        if ($this->controller) {
+            // Process UI event before to be safe.
+            $this->controller->process_ui_event();
+        }
     }
 
     /**
