Index: openadstream.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/openadstream/openadstream.module,v
retrieving revision 1.1.2.33
diff -u -p -r1.1.2.33 openadstream.module
--- openadstream.module	15 Jan 2010 00:45:59 -0000	1.1.2.33
+++ openadstream.module	7 Dec 2010 00:38:04 -0000
@@ -128,7 +128,7 @@ function openadstream_positions($positio
   
   // If a position name was submitted, add it to the stack.
   if (!empty($position)) {
-    $positions[] = $position;
+    $positions[$position] = $position;
   }
   
   return $positions;
@@ -486,7 +486,9 @@ function _openadstream_js($hostname, $pa
   }
   
   // Build the full URL to load the page JS.
-  $src = $base_url . $hostname . "/' + p + '/" . rand() .'@'. implode(',', $ad_positions) . '?' . $tags;
+  // Random number must begin with '1'.
+  $rand = '1'. mt_rand(1, 100000000);
+  $src = $base_url . $hostname . "/' + p + '/" . $rand .'@'. implode(',', $ad_positions) . '?' . $tags;
   $js = "<script type=\"text/javascript\">\n";
   $js .= "<!--//--><![CDATA[//><!--\n";
   // The pagename found thus far.
