diff --git a/src/Plugin/TabRenderer/AccordianTabs.php b/src/Plugin/TabRenderer/AccordianTabs.php
index 1bacb54..870e9f7 100644
--- a/src/Plugin/TabRenderer/AccordianTabs.php
+++ b/src/Plugin/TabRenderer/AccordianTabs.php
@@ -93,11 +93,14 @@ class AccordianTabs extends TabRendererBase {
       $tab['tab_page'] = $index;
       $tab_pages[] = $tab;
     }
+    if(!$active_tab = \Drupal::request()->query->get('qt-'. $qt_id)) {
+      $active_tab = $instance->getDefaultTab() == 9999 ? 0 : $instance->getDefaultTab();
+    }
 
     $options = $instance->getOptions()['accordion_tabs'];
-    $active_tab = $instance->getDefaultTab() == 9999 ? 0 : $instance->getDefaultTab();
-    $active = $instance->getDefaultTab() == 9999 ? FALSE : (int)$instance->getDefaultTab();
-    $collapsible = $instance->getDefaultTab() == 9999 ? TRUE : (int)$options['jquery_ui']['collapsible'];
+    $active = $active_tab == 9999 ? FALSE : (int)$active_tab;
+    $collapsible = $active_tab == 9999 ? TRUE : (int)$options['jquery_ui']['collapsible'];
+
     $build['#attached'] = array(
       'library' => array('quicktabs/quicktabs.accordion'),
       'drupalSettings' => array(
diff --git a/src/Plugin/TabRenderer/QuickTabs.php b/src/Plugin/TabRenderer/QuickTabs.php
index ef9d6a4..4327186 100644
--- a/src/Plugin/TabRenderer/QuickTabs.php
+++ b/src/Plugin/TabRenderer/QuickTabs.php
@@ -73,7 +73,10 @@ class QuickTabs extends TabRendererBase {
     $is_ajax = $instance->getOptions()['quick_tabs']['ajax'];
     foreach ($instance->getConfigurationData() as $index => $tab) {
       // Build the pages //////////////////////////////////////
-      $default_tab = $instance->getDefaultTab() == 9999 ? 0 : $instance->getDefaultTab();
+      if(!$default_tab = \Drupal::request()->query->get('qt-'. $qt_id)) {
+        $default_tab = $instance->getDefaultTab() == 9999 ? 0 : $instance->getDefaultTab();
+      }
+
       if ($is_ajax) {
         if ($default_tab == $index) {
           $object = $type->createInstance($tab['type']);
diff --git a/src/Plugin/TabRenderer/UiTabs.php b/src/Plugin/TabRenderer/UiTabs.php
index 5ff50f7..2fe24a3 100644
--- a/src/Plugin/TabRenderer/UiTabs.php
+++ b/src/Plugin/TabRenderer/UiTabs.php
@@ -87,7 +87,9 @@ class UiTabs extends TabRendererBase {
     array_unshift($build, $tabs);
     
     // Attach js
-    $default_tab = $instance->getDefaultTab();
+    if(!$default_tab = \Drupal::request()->query->get('qt-'. $qt_id)) {
+        $default_tab = $instance->getDefaultTab();
+    }
     $build['#attached'] = array(
       'library' => array('quicktabs/quicktabs.ui'),
       'drupalSettings' => array(
diff --git a/src/Plugin/TabType/ViewContent.php b/src/Plugin/TabType/ViewContent.php
index 4065092..8d6c289 100644
--- a/src/Plugin/TabType/ViewContent.php
+++ b/src/Plugin/TabType/ViewContent.php
@@ -73,6 +73,19 @@ class ViewContent extends TabTypeBase {
   public function render(array $tab) {
     $options = $tab['content'][$tab['type']]['options'];
     $args = empty($options['args']) ? [] : array_map('trim', explode(',', $options['args']));
+    if (isset($args)) {
+      $current_path = \Drupal::service('path.current')->getPath();
+      // If the request is a ajax callback we need to use $_SERVER['HTTP_REFERER'] to get current path.
+      if (strpos($current_path, '/quicktabs/ajax/') !== FALSE) {
+        $HTTP_REFERER =  parse_url($_SERVER['HTTP_REFERER']);
+        $current_path = \Drupal::service('path.alias_manager')->getPathByAlias($HTTP_REFERER['path']);
+      }
+      $url_args = explode('/', $current_path);
+      foreach ($url_args as $id => $arg) {
+        $args = str_replace("%$id", $arg, $args);
+      }
+      $args = preg_replace(',/?(%\d),', '', $args);
+    }
     $view = Views::getView($options['vid']);
 
     // Return empty render array if user doesn't have access.
