diff --git a/block_refresh.module b/block_refresh.module
index f1709d1..fe1ae2d 100644
--- a/block_refresh.module
+++ b/block_refresh.module
@@ -34,8 +34,8 @@ function block_refresh_help($path, $arg) {
       $block_refresh_help .= t("Ensure that you have !configured for user roles. Adding a permission to %access will allow a block, when configured, to be refreshed automatically and/or manually.", array('%access' => 'access block refresh content', '!configured' => l(t('configured permissions'), 'admin/user/access', array(), NULL, 'module-block_refresh')));
       $block_refresh_help .= '</div><div class="form-item">';
       $block_refresh_help .= t("You will also need to set the appropriate settings for each block that you wish to automatically and/or manually refresh by clicking on the appropriate %configure link(s) on the !admin.", array('%configure' => t('configure'), '!admin' => l(t('blocks administration page'), 'admin/build/block')));
-      $block_refresh_help .= '</div>';  
-      return $block_refresh_help;      
+      $block_refresh_help .= '</div>';
+      return $block_refresh_help;
   }
 }
 
@@ -93,7 +93,7 @@ function block_refresh_submit($form, &$form_state) {
   $settings['block-' . $form_state['values']['module'] . '-' . $form_state['values']['delta']]['group'] = $form_state['values']['block_refresh_group'];
   $settings['block-' . $form_state['values']['module'] . '-' . $form_state['values']['delta']]['timer'] = $form_state['values']['block_refresh_timer'];
   $settings['block-' . $form_state['values']['module'] . '-' . $form_state['values']['delta']]['block'] = array('block' => $form_state['values']['module'], 'delta' => $form_state['values']['delta']);
-  
+
   variable_set('block_refresh_settings', $settings);
 }
 
@@ -145,32 +145,38 @@ function block_refresh_footer($main = 0) {
   foreach ($settings as $block) {
     // If the block is configured for Block Refresh...
     if (isset($blocks[$block['block']['block'] . '_' . $block['block']['delta']])) {
+      $base = base_path();
+      // Checks to see whether clean URLs are enabled or not
+      $url = $base . (variable_get('clean_url', 0) == 0 ? "?q=" : "") .
+        "block_refresh/{$block['block']['block']}/{$block['block']['delta']}";
+      // Add page arguments to block_refresh URL
+      foreach( arg() as $arg ) {
+        $url .= "/$arg";
+      }
       // I believe (though have not thoroughly tested) that this is an unnecessary test
       if ($block['enabled']) {
         // this is the block div css id and content class
         $div = "#block-{$block['block']['block']}-{$block['block']['delta']} .content";
-      
+
         // we store seconds, but js expects milliseconds
         $timer = $block['timer'] * 1000;
-      
+
         $base = base_path();
-        // Set jQuery array to be set in page footer ... also checks to see whether clean URLs are enabled or not
-        $js .= "  _block_refresh_data['$div'] = new block_refresh_data({$timer}, '{$base}" . (variable_get('clean_url', 0) == 0 ? "?q=" : "") . "block_refresh/{$block['block']['block']}/{$block['block']['delta']}');\n";
+        // Set jQuery array to be set in page footer
+        $js .= "  _block_refresh_data['$div'] = new block_refresh_data({$timer}, '$url');\n";
         $js .= "  block_refresh_timer('$div');";
       }
       // If the block is configured to be user-refreshed
       if ($block['manual']) {
         // this is the block div css id and content class
         $div = "block-{$block['block']['block']}-{$block['block']['delta']}";
-      
-        $base = base_path();
-        $url = "{$base}block_refresh/{$block['block']['block']}/{$block['block']['delta']}";
+
         $content_url = "#$div .content";
         $js .= "  block_refresh_add_button('$div', '$url', '$content_url', '" . t('Refresh') . "');";
       }
     }
   }
-  
+
   // If there is a block that is currently being displayed that is configured to work with Block Refresh...
   if (!empty($js)) {
     drupal_add_js("\$(document).ready(function() {\n$js\n})", 'inline', 'footer');
@@ -229,6 +235,22 @@ function block_refresh_block_content($block = NULL, $delta = NULL) {
   if (!$settings['block-' . $block . '-' . $delta]['enabled'] && !$settings['block-' . $block . '-' . $delta]['manual']) {
     drupal_not_found();
   }
+  // Validate args and get referring page args from the end. Set as path.
+  $args = arg();
+  if(!empty($args[3]) && $args[0] == 'block_refresh' && $args[1] == $block && $args[2] == $delta) {
+    unset($args[0]);
+    unset($args[1]);
+    unset($args[2]);
+    $_GET['q'] = implode('/', $args);
+		// Refresh OG group context, if OG is installed (copied from og.module)
+		if ($group_node = og_determine_context()) {
+			og_set_theme($group_node);
+			og_set_group_context($group_node);
+			og_set_language($group_node);
+		}
+  } else {
+    $_GET['q'] = '';
+  }
   $block = module_invoke($block, 'block', 'view', $delta);
   print $block['content'];
   exit();
@@ -258,4 +280,4 @@ function block_refresh_jq($op, $plugin = NULL, $args = array(), $already_loaded
       );
     return $info;
   }
-}
\ No newline at end of file
+}
