diff --git a/contextual.module b/contextual.module
index e19464a..3b309f1 100644
--- a/contextual.module
+++ b/contextual.module
@@ -425,31 +425,30 @@ function contextual_contextual_user($account) {
  * Implementation of hook_contextual_views().
  */
 function contextual_contextual_views($view) {
-
-  $actions = array();
-
-  $links['views-edit'] = array(
-    'weight' => 0,
-    'title' => 'Edit view',
-    'href' => 'admin/build/views/edit/' . $view->name,
-    'fragment' => 'views-tab-' . $view->current_display
-  );
-  $links['views-export'] = array(
-    'weight' => 1,
-    'title' => 'Export view',
-    'href' => 'admin/build/views/export/' . $view->name,
-    'fragment' => 'views-tab-' . $view->current_display
-  );
-  $links['views-clone'] = array(
-    'weight' => 2,
-    'title' => 'Clone view',
-    'href' => 'admin/build/views/clone/' . $view->name,
-    'fragment' => 'views-tab-' . $view->current_display
-  );
-
+  $links = array();
   // First of all, access and ui check. After that, let's check if we are
   // curently working with a block or not. If so, we'll set the actions statically.
   if (user_access('administer views') && module_exists('views_ui')) {
+
+    $links['views-edit'] = array(
+      'weight' => 0,
+      'title' => 'Edit view',
+      'href' => 'admin/build/views/edit/' . $view->name,
+      'fragment' => 'views-tab-' . $view->current_display
+    );
+    $links['views-export'] = array(
+      'weight' => 1,
+      'title' => 'Export view',
+      'href' => 'admin/build/views/export/' . $view->name,
+      'fragment' => 'views-tab-' . $view->current_display
+    );
+    $links['views-clone'] = array(
+      'weight' => 2,
+      'title' => 'Clone view',
+      'href' => 'admin/build/views/clone/' . $view->name,
+      'fragment' => 'views-tab-' . $view->current_display
+    );
+
     if (strstr($view->current_display, 'page') !== FALSE) {
       contextual_set_links('page-actions', $links);
     }
