Fixes ActiveRecord 4.1