Potential fix for Rails 4