diff --git a/Gemfile b/Gemfile
index 0bac89781601962fe7f160a2ed00775021938bfb..ee8b2a7a51a469e5946d1affaf74d549af8de549 100644
--- a/Gemfile
+++ b/Gemfile
@@ -113,7 +113,7 @@ group :unicorn do
 end
 
 # State machine
-gem "state_machine", '~> 1.2.0'
+gem "state_machines-activerecord", '~> 0.3.0'
 # Run events after state machine commits
 gem 'after_commit_queue'
 
diff --git a/config/initializers/state_machine_patch.rb b/config/initializers/state_machine_patch.rb
index 72d010fa5deab3f48285ad4ab07f1793f6d9c3a2..51f0579436146b5eba45b88a97ff3fc1a6fdf94c 100644
--- a/config/initializers/state_machine_patch.rb
+++ b/config/initializers/state_machine_patch.rb
@@ -1,6 +1,6 @@
 # This is a patch to address the issue in https://github.com/pluginaweek/state_machine/issues/251
 # where gem 'state_machine' was not working for Rails 4.1
-module StateMachine
+module StateMachines
   module Integrations
     module ActiveModel
       public :around_validation