diff --git a/xmlsitemap.xmlsitemap.inc b/xmlsitemap.xmlsitemap.inc
index 90d98b8f7173d222d5fddaf6645ea028c13ca558..275c09f900440eb809d6f5c9f8e162c4c10e4b95 100644
--- a/xmlsitemap.xmlsitemap.inc
+++ b/xmlsitemap.xmlsitemap.inc
@@ -199,9 +199,8 @@ class XMLSitemapIndexWriter extends XMLSitemapWriter {
     $lastmod_format = variable_get('xmlsitemap_lastmod_format', XMLSITEMAP_LASTMOD_MEDIUM);
 
     for ($i = 1; $i <= $this->sitemap->chunks; $i++) {
-      $url_options['query']['page'] = $i;
       $element = array(
-        'loc' => $this->getSitemapUrl('sitemap.xml'),
+        'loc' => $this->getSitemapUrl('sitemap.xml', array('query' => array('page' => $i))),
         // @todo Use the actual lastmod value of the chunk file.
         'lastmod' => gmdate($lastmod_format, REQUEST_TIME),
       );