Fix issue with ActiveRecord 4.1.1