diff --git a/view_unpublished.install b/view_unpublished.install
index 3b3406f..7b8155f 100644
--- a/view_unpublished.install
+++ b/view_unpublished.install
@@ -1,13 +1,19 @@
 <?php
 // $Id$
 
+/**
+ * Implementation of hook_install()
+ */
 function view_unpublished_install() {
-  //Empty because I didn't include one before.
+  // Make sure that the view_unpublished module runs after other access modules.
+  db_query("UPDATE {system} SET weight = 1 WHERE name = 'view_unpublished' AND type = 'module' AND weight = 0");
 }
 
 /**
- * Make sure that the view_unpublished module runs after other access modules like module_grants.
-*/
+ * Make sure that the view_unpublished module runs after other access modules.
+ */
 function view_unpublished_update_6000() {
-  db_query("UPDATE {system} SET weight = 1 WHERE name = 'view_unpublished' and type = 'module'");
+  $ret = array();
+  $ret[] = update_sql("UPDATE {system} SET weight = 1 WHERE name = 'view_unpublished' AND type = 'module' AND weight = 0");
+  return $ret;
 }
