diff --git a/lib/githooks/runner.rb b/lib/githooks/runner.rb
index <HASH>..<HASH> 100644
--- a/lib/githooks/runner.rb
+++ b/lib/githooks/runner.rb
@@ -285,9 +285,12 @@ module GitHooks
           # stupid RVM polluting my environment without asking via it's
           # executable-hooks gem preloading bundler. hence the following ...
           if defined? Bundler
-            [:@settings, :@bundle_path, :@configured, :@definition, :@load].each do |var|
+            [:@bundle_path, :@configured, :@definition, :@load].each do |var|
               Bundler.instance_variable_set(var, nil)
             end
+            # bundler tests for @settings using defined? - which means we need
+            # to forcibly remove it.
+            Bundler.send(:remove_instance_variable, :@settings)
           else
             require 'bundler'
           end
diff --git a/lib/githooks/version.rb b/lib/githooks/version.rb
index <HASH>..<HASH> 100644
--- a/lib/githooks/version.rb
+++ b/lib/githooks/version.rb
@@ -18,5 +18,5 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 =end
 
 module GitHooks
-  VERSION = '1.2.6'
+  VERSION = '1.2.7'
 end
fix bundler reset bug where recent bundler versions check for defined?(@settings)