diff --git a/rah_bitly.php b/rah_bitly.php
index <HASH>..<HASH> 100644
--- a/rah_bitly.php
+++ b/rah_bitly.php
@@ -179,9 +179,9 @@ class rah_bitly {
 
 	public function update($event, $step, $r) {
 		
-		global $app_mode;
+		global $app_mode, $ID;
 		
-		$this->permlink = permlinkurl_id($r['ID']);
+		$this->permlink = permlinkurl_id($ID ? $ID : $r['ID']);
 		
 		callback_event('rah_bitly.update');
ID isn't available on article_posted event.

Need to use the global $ID.