diff --git a/twitter_post/twitter_post.install b/twitter_post/twitter_post.install
index 873757d..e72fcdb 100644
--- a/twitter_post/twitter_post.install
+++ b/twitter_post/twitter_post.install
@@ -23,18 +23,19 @@ function twitter_post_uninstall() {
  * Add the new "post to twitter with global account" permission to all roles
  * that have the "post to twitter" permission.
  */
-function twitter_post_update_7500() {
-  $roles = db_query("SELECT rid
-    FROM {role_permission}
-    WHERE permission = 'post to twitter'")
-    ->fetchCol();
-  foreach ($roles as $rid) {
+function twitter_post_update_6200() {
+  $result = db_query("SELECT rid
+    FROM {permission}
+    WHERE perm = 'post to twitter'");
+  while ($row = db_fetch_object($result)) {
     $record = new StdClass();
-    $record->rid = $rid;
-    $record->permission = 'post to twitter with global account';
-    $record->module = 'twitter';
-    drupal_write_record('role_permission', $record);
+    $record->rid = $row->rid;
+    $record->perm = 'post to twitter with global account';
+    $record->tid = 0;
+    drupal_write_record('permission', $record);
   }
 
   drupal_set_message(t('A new permission "Post a message to Twitter using a global account" as been added to all roles that already had the "Post a message to Twitter" permission. It is recommended to <a href="@url">review the permissions</a> to ensure they are appropriate for this site\'s needs.', array('@url' => url('admin/people/permissions'))));
+
+  return array();
 }
