diff --git a/apachesolr.admin.inc b/apachesolr.admin.inc
index 2db3051..c7b5830 100644
--- a/apachesolr.admin.inc
+++ b/apachesolr.admin.inc
@@ -936,18 +936,18 @@ function apachesolr_mlt_save_block($block_settings = array(), $delta = NULL) {
   variable_set('apachesolr_mlt_blocks', $blocks);
 }
 
-function apachesolr_mlt_delete_block_form($form_state, $delta) {
+function apachesolr_mlt_delete_block_form($form, &$form_state, $delta) {
   if ($block = apachesolr_mlt_load_block($delta)) {
     $form['delta'] = array(
       '#type' => 'value',
       '#value' => $delta
     );
-
-    return confirm_form($form,
-      t('Are you sure you want to delete the Apache Solr content recommendation block %name?', array('%name' => $block['name'])),
-      'admin/structure/block',
-      t('The block will be deleted. This action cannot be undone.'),
-      t('Delete'), t('Cancel'));
+    $question = t('Are you sure you want to delete the Apache Solr content recommendation block %name?', array('%name' => $block['name']));
+    $path = 'admin/structure/block';
+    $description = t('The block will be deleted. This action cannot be undone.');
+    $yes = t('Delete');
+    $no = t('Cancel');
+    return confirm_form($form, $question, $path, $description, $yes, $no);
   }
 }
 
diff --git a/apachesolr.module b/apachesolr.module
index 45b5a6e..6b22472 100644
--- a/apachesolr.module
+++ b/apachesolr.module
@@ -131,7 +131,7 @@ function apachesolr_menu() {
   );
   $items['admin/config/search/apachesolr/mlt/delete_block/%'] = array(
     'page callback'      => 'drupal_get_form',
-    'page arguments'     => array('apachesolr_mlt_delete_block_form', 5),
+    'page arguments'     => array('apachesolr_mlt_delete_block_form', 6),
     'access arguments'   => array('administer search'),
     'file'               => 'apachesolr.admin.inc',
     'type'               => MENU_CALLBACK,
@@ -2196,9 +2196,13 @@ function apachesolr_mlt_suggestions($settings, $id, $solr = NULL) {
  * Implements hook_form_[form_id]_alter().
  */
 function apachesolr_form_block_admin_display_form_alter(&$form) {
-  foreach ($form as $key => $block) {
+  foreach ($form['blocks'] as $key => $block) {
     if ((strpos($key, "apachesolr_mlt-") === 0) && $block['module']['#value'] == 'apachesolr') {
-      $form[$key]['delete'] = array('#value' => l(t('delete'), 'admin/config/search/apachesolr/mlt/delete_block/' . $block['delta']['#value']));
+      $form['blocks'][$key]['delete'] = array(
+        '#type' => 'link',
+        '#title' => 'delete',
+        '#href' => 'admin/config/search/apachesolr/mlt/delete_block/' . $block['delta']['#value'],
+      );
     }
   }
 }
