diff --git a/mod/lesson/renderer.php b/mod/lesson/renderer.php
index 872e598420b..6c6496b7899 100644
--- a/mod/lesson/renderer.php
+++ b/mod/lesson/renderer.php
@@ -560,14 +560,17 @@ class mod_lesson_renderer extends plugin_renderer_base {
     public function slideshow_start(lesson $lesson) {
         $attributes = array();
         $attributes['class'] = 'slideshow';
-        $attributes['style'] = 'background-color:'.$lesson->bgcolor.';height:'.$lesson->height.'px;width:'.$lesson->width.'px;';
+        $attributes['style'] = 'background-color:'.$lesson->properties()->bgcolor.';height:'.
+                $lesson->properties()->height.'px;width:'.$lesson->properties()->width.'px;';
         $output = html_writer::start_tag('div', $attributes);
+        return $output;
     }
     /**
      * Returns HTML to show the end of a slideshow
      */
     public function slideshow_end() {
         $output = html_writer::end_tag('div');
+        return $output;
     }
     /**
      * Returns a P tag containing contents
diff --git a/mod/lesson/view.php b/mod/lesson/view.php
index 4b6824a6f5c..097a93cdb11 100644
--- a/mod/lesson/view.php
+++ b/mod/lesson/view.php
@@ -410,7 +410,6 @@ if ($pageid != LESSON_EOL) {
         echo '<a name="maincontent" id="maincontent" title="' . get_string('anchortitle', 'lesson') . '"></a>';
     }
     echo $lessoncontent;
-    echo $lessonoutput->slideshow_end();
     echo $lessonoutput->progress_bar($lesson);
     echo $lessonoutput->footer();