Fix incompatibility with Rails 4.1.