diff --git a/media_gallery.module b/media_gallery.module
index 70f3932..0bef796 100644
--- a/media_gallery.module
+++ b/media_gallery.module
@@ -358,12 +358,10 @@ function media_gallery_view($node, $view_mode) {
       '#weight' => 20,
       '#attributes' => array('class' => array('colorbox-supplemental-links')),
     );
-    // Finally, display the pager, with a high weight so it appears at the
-    // bottom.
+    // Finally, creating the pager and adding it in the seffix
     if ($full) {
       $node->content['media_gallery_pager'] = array(
-        '#theme' => 'pager',
-        '#element' => MEDIA_GALLERY_PAGER_ELEMENT,
+        '#suffix' => theme('pager',array('element' => MEDIA_GALLERY_PAGER_ELEMENT)),
         '#weight' => 2000,
       );
     }
