diff --git a/lib/rollbar/middleware/rails/rollbar_request_store.rb b/lib/rollbar/middleware/rails/rollbar_request_store.rb
index <HASH>..<HASH> 100644
--- a/lib/rollbar/middleware/rails/rollbar_request_store.rb
+++ b/lib/rollbar/middleware/rails/rollbar_request_store.rb
@@ -14,7 +14,7 @@ module Rollbar
           rescue
             controller = env["action_controller.instance"]
             if controller and controller.respond_to? :rollbar_person_data
-              env['rollbar.person_data'] = controller.rollbar_person_data
+              env['rollbar.person_data'] = controller.rollbar_person_data rescue {}
             end
             raise
           end
diff --git a/lib/rollbar/railtie.rb b/lib/rollbar/railtie.rb
index <HASH>..<HASH> 100644
--- a/lib/rollbar/railtie.rb
+++ b/lib/rollbar/railtie.rb
@@ -10,8 +10,7 @@ module Rollbar
     if defined? ActiveRecord
       initializer 'rollbar.middleware.rails' do |app|
         require 'rollbar/middleware/rails/rollbar_request_store'
-        app.config.middleware.insert_after ActiveRecord::ConnectionAdapters::ConnectionManagement,
-          Rollbar::Middleware::Rails::RollbarRequestStore
+        app.config.middleware.use Rollbar::Middleware::Rails::RollbarRequestStore
       end
     end
insert RollbarRequestStore middleware at the end in case the ConnectionManagement middleware isn't used