diff --git a/js/civicrm_stripe.js b/js/civicrm_stripe.js
index f8552e9125a839ca7f229054f426b2c7f2217a7d..d42de5606c2c4f07734804813abc6e997bcd086a 100644
--- a/js/civicrm_stripe.js
+++ b/js/civicrm_stripe.js
@@ -41,7 +41,14 @@
   // Prepare the form.
   $(document).ready(function() {
     Stripe.setPublishableKey($('#stripe-pub-key').val());
+    loadStripeBillingBlock();
+  });
+
+  CRM.$('input[name="payment_processor_id"]').change(function() {
+    loadStripeBillingBlock();
+  });
 
+  function loadStripeBillingBlock() {
     // Check for form marked as a stripe-payment-form by the server.
     if (!($('form.stripe-payment-form').length)) {
       // If there isn't one look for it.
@@ -49,8 +56,11 @@
         isWebform = true;
         $('form.webform-client-form').addClass('stripe-payment-form');
       }
+      else if ($('#crm-container form').length) {
+        $('#crm-container form').addClass('stripe-payment-form');
+      }
       else {
-        $('#crm-container > form').addClass('stripe-payment-form');
+        return;
       }
     }
 
@@ -223,7 +233,7 @@
       debugging('debug: ywkvh (Getting Stripe token)');
       return false;
     });
-  });
+  }
 }(cj, CRM));
 
 function debugging (errorCode) {
diff --git a/stripe.php b/stripe.php
index 6568e7b1ffb12c9feff425f7cf3802435925499f..f8555526656bb2d07b4af8c5cd23edfd375856c0 100644
--- a/stripe.php
+++ b/stripe.php
@@ -195,10 +195,8 @@ function stripe_civicrm_managed(&$entities) {
    */
   function stripe_civicrm_alterContent( &$content, $context, $tplName, &$object ) {
     if($context == 'form' && !empty($object->_paymentProcessor['class_name'])) {
-      if($object->_paymentProcessor['class_name'] == 'Payment_Stripe') {
-        $stripeJSURL = CRM_Core_Resources::singleton()->getUrl('com.drastikbydesign.stripe', 'js/civicrm_stripe.js');
-        $content .= "<script src='{$stripeJSURL}'></script>";
-      }
+      $stripeJSURL = CRM_Core_Resources::singleton()->getUrl('com.drastikbydesign.stripe', 'js/civicrm_stripe.js');
+      $content .= "<script src='{$stripeJSURL}'></script>";
     }
   }