 mod/lesson/renderer.php |    7 ++++---
 mod/lesson/view.php     |    1 -
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/mod/lesson/renderer.php b/mod/lesson/renderer.php
index a37f40b..f344cea 100644
--- a/mod/lesson/renderer.php
+++ b/mod/lesson/renderer.php
@@ -552,16 +552,17 @@ class mod_lesson_renderer extends plugin_renderer_base {
      * @param lesson $lesson
      */
     public function slideshow_start(lesson $lesson) {
+        global $CFG;
         $attributes = array();
         $attributes['class'] = 'slideshow';
-        $attributes['style'] = 'background-color:'.$lesson->bgcolor.';height:'.$lesson->height.'px;width:'.$lesson->width.'px;';
-        $output = html_writer::start_tag('div', $attributes);
+        $attributes['style'] = 'background-color:'.$CFG->lesson_slideshowbgcolor.';height:'.$CFG->lesson_slideshowheight.'px;width:'.$CFG->lesson_slideshowwidth.'px;';
+        return html_writer::start_tag('div', $attributes);
     }
     /**
      * Returns HTML to show the end of a slideshow
      */
     public function slideshow_end() {
-        $output = html_writer::end_tag('div');
+        return html_writer::end_tag('div');
     }
     /**
      * Returns a P tag containing contents
diff --git a/mod/lesson/view.php b/mod/lesson/view.php
index 5beec57..093c618 100644
--- a/mod/lesson/view.php
+++ b/mod/lesson/view.php
@@ -400,7 +400,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();
 
