diff --git a/lib/rescue_from_duplicate/active_record/extension.rb b/lib/rescue_from_duplicate/active_record/extension.rb
index <HASH>..<HASH> 100644
--- a/lib/rescue_from_duplicate/active_record/extension.rb
+++ b/lib/rescue_from_duplicate/active_record/extension.rb
@@ -45,7 +45,7 @@ module RescueFromDuplicate::ActiveRecord
     def exception_handler(exception)
       columns = exception_columns(exception)
       return unless columns
-      columns.sort!
+      columns = columns.sort
 
       self.class._rescue_from_duplicate_handlers.detect do |handler|
         handler.rescue? && columns == handler.columns
Do not mutate Active Record internal data