Fix some of the Rails 4 errors.