diff --git a/js/redactor-osticket.js b/js/redactor-osticket.js
index 4a919612bce3612a623f62a60085f04e883a5018..85bed3ac97ef07723a6e816b3a28b130faa69a56 100644
--- a/js/redactor-osticket.js
+++ b/js/redactor-osticket.js
@@ -280,4 +280,5 @@ $(function() {
     };
     findRichtextBoxes();
     $(document).ajaxStop(findRichtextBoxes);
+    $(document).on('pjax:success', findRichtextBoxes);
 });
diff --git a/scp/js/scp.js b/scp/js/scp.js
index e2bb171c5a8a7a0e1beef6ce8a7bc1b068304d3f..78cefa1e3158db379993d84e49a2aa32868e045a 100644
--- a/scp/js/scp.js
+++ b/scp/js/scp.js
@@ -623,8 +623,20 @@ getConfig = (function() {
                 dataType: 'json',
                 success: function (json_config) {
                     dfd.resolve(json_config);
+                },
+                error: function() {
+                    requested = null;
                 }
             });
         return dfd;
     }
 })();
+
+$(document).on('pjax:start', function() { clearInterval(window.ticket_refresh); });
+$(document).on('click', 'a', function() {
+    var ul = $(this).closest('ul');
+    if (ul.is('#sub_nav')) {
+        $('a.active', ul).removeClass('active');
+        $(this).addClass('active');
+    }
+});
diff --git a/scp/tickets.php b/scp/tickets.php
index 2df7cc7a29912bc0de64dcde8db444bb120ef9d3..3699015aa3745792b0fa05b79c83df9d446f8c69 100644
--- a/scp/tickets.php
+++ b/scp/tickets.php
@@ -617,8 +617,7 @@ if($ticket) {
     //set refresh rate if the user has it configured
     if(!$_POST && !$_REQUEST['a'] && ($min=$thisstaff->getRefreshRate()))
         $ost->addExtraHeader('',
-            "clearInterval(window.ticket_refresh);
-             window.ticket_refresh = setTimeout(function() { $.pjax({url: document.location.href, container:'#content'});},"
+            "window.ticket_refresh = setTimeout(function() { $.pjax({url: document.location.href, container:'#content'});},"
             .($min*60000).");");
 }