fix regression in Rails 4