More Fixes for Rails 4