diff --git a/insert_block.module b/insert_block.module
index 5363385..9917a50 100644
--- a/insert_block.module
+++ b/insert_block.module
@@ -49,9 +49,11 @@ function _insert_block($text, $filter, $format) {
       $module = $match[1][$key];
       $delta = $match[2][$key];
 
-      $block = module_invoke($module, 'block_view', $delta);
-
-      $repl[] = theme('insert_block_block', array('block' => $block));
+      // see comments on http://api.drupal.org/api/drupal/developer--theme.php/function/theme_block/7
+      $block = block_load($module, $delta);
+      $block_content = _block_render_blocks(array($block));
+      $build = _block_get_renderable_array($block_content);
+      $repl[] = drupal_render($build);
     }
     return str_replace($raw_tags, $repl, $text);
   }
@@ -70,35 +72,4 @@ function _insert_block_tips($filter, $format, $long = FALSE) {
     return t('You may use <a href="@insert_block_help">[block:<em>module</em>=<em>delta</em>] tags</a> to display the contents of block <em>delta</em> for module <em>module</em>.',
     array("@insert_block_help" => url("filter/tips/$format->format", array('fragment' => 'filter-insert_block'))));
   }
-}
-
-/**
- * Implementation of hook_theme().
- */
-function insert_block_theme() {
-  $themes = array(
-    'insert_block_block' => array(
-      'variables' => array('block' => NULL),
-    ),
-  );
-  return $themes;
-}
-
-/**
- * Format an included block.
- *
- * Gets passed the block array to be formatted. By default it includes
- * the block subject, if any, and the block's content.
- *
- * @ingroup themeable
- */
-function theme_insert_block_block($vars) {
-  $content = '';
-  if (!empty($vars['block']['subject'])) {
-    $content .= '<h2>'. $vars['block']['subject'] .'</h2>';
-  }
-  if (!empty($vars['block']['content'])) {
-    $content .= render($vars['block']['content']);
-  }
-  return $content;
-}
+}
\ No newline at end of file
