Fix rails 4.0 errors.