Changed more stuff for Rails 4